mbayader
asked on
Reconnect in MySQL using hibernate
Hi everyone,
I am working on a web based database application, i am using Struts, Hibernate and Tomcat. the database is MySQL. the problem i am facing is after 8 hours the connection will terminate with the MySQL server. it wont reconnect again till I reset the tomcat sever or redeploy.
any suggestions??
I am working on a web based database application, i am using Struts, Hibernate and Tomcat. the database is MySQL. the problem i am facing is after 8 hours the connection will terminate with the MySQL server. it wont reconnect again till I reset the tomcat sever or redeploy.
any suggestions??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://confluence.atlassian.com/display/DOC/Configuring+a+MySQL+Datasource+in+Apache+Tomcat
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
just in case someone still needs an answer. check out this article. exactly what I needed:
http://www.databasesandlife.com/automatic-reconnect-from-hibernate-to-mysql/
http://www.databasesandlife.com/automatic-reconnect-from-hibernate-to-mysql/