I have a Tomcat servlet that enables hibernation. It is working fine. When the servlet starts, I initialize sleep mode and create a factory session. Then I use this factory session to create sessions when doing various database transactions. So far, so good. My problem arises after a long period of inactivity of the servlet (say when users go home at night and then try to log in the next morning). Suddenly I canβt communicate with the data. In the magazines I see
org.hibernate.exception.JDBCConectionException: The request failed.
If I stop and restart Tomcat by reinitializing my servlet and rebuilding the factory session, everything works fine. Does it almost look like a factory timeout session itself?
Any ideas?
Thank,
Elliot
source
share