java - Hibernate cannot recover after socket has timed out -


I have an application that uses hibernate to connect to my MySQL database, only with timeout Having a strange problem assume that the socket timeout in MySQL's configuration is set to one hour. After an hour of inactivity, the socket bar is expected to be as high as the problem is that hibernation appears not to be able to handle socket timeouts, because when hibernation tries to create a database query, throw a socket exception. goes. Instead of handling an exception internally, just "dies" is hibernate and with no exception in any other way, I can not be cured by manually building a new session feature manually.

The question is, how can I avoid this problem that I do not need to manually track the deadline?

Edit Your suggestions seem to go right, but for some reason I am not able to work on it. I tried to follow the instructions and instructions given on Jimmy's page, but I still get the same exception and my application fails due to this. There may be something to do that I have set my scheme up to 120 seconds (for testing purposes only), but I changed the c3p0 timeout to 100 seconds.

Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -