Joined: Sat Apr 21, 2007 9:48 pm Posts: 9
|
If suppose in my application; db connection got closed ( due to any reasons like DB got restarted OR mysql timeout of 8 hrs over so mysql closes the connection) . Now if I do sess.isOpen() or sess.isConnected() both returns true but
sess.connection().isClosed() returns true...
I am using current_session_context_class as thread. So, how do I handle this ? I mean before returning getCurrentSession() I can always check above condition but if its true how do I remove this connection from sessionFactory pool so that sessionfactory pool does not return this session ever ?
I tried session.reconnect() but that doesnt work though its deprecated.
|
|