Hi,
I have this problem: Our application is running on a tomcat 5.5 and uses hibernate with a mysql 5 database. It works great during office hours, but when we arrive in the morning, the tomcat is still running, but the database connections had been closed by the database. Hibernate doesn't know about this and tries to use them. If we reload the page after the exception we get, it starts working, because it creates new connections.
I've been reading about this (
http://www.mchange.com/projects/c3p0/index.html#configuring_recovery) and tried to configure c3p0 to handle this, but I get te same error. Also I don't know how to test this properly, so far I've been killing the connection thread with the mysql administrator.
This is the hibernate.cfg.xml
This is my c3p0.properties, which is located in the src folder of the project (the root of all packages).. does it go there?
Is my configuration ok? How can I prevent this error from happening? If it does happen, how can I prevent the application from failing?
Thanks a lot.
Pablo.