hibernate

Hibernate and MySQL Connection Timeouts

Some days ago i had have issue with my persistent level. The issue was with mysql connection timeout and hibernate c3p0 default connection setup.
Problem:
After 8 hours of inactivity of my application i have a broken pipe exception.
Root of problem:
MySQL automatically times out, and closes unused connections after 8 hours, and out of the box, Hibernate does not set up C3P0 to appropriately test/refresh its connection pool when connections go stale.
Solution:

Syndicate content