handle hibernate session