File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes Hibernate Preventing Connection Timeouts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate Preventing Connection Timeouts" Watch "Hibernate Preventing Connection Timeouts" New topic

Hibernate Preventing Connection Timeouts

Abiodun Adisa
Ranch Hand

Joined: Jan 17, 2002
Posts: 495
I am using Hibernate to connect to my MYSQL version 5 database, any time i leave the application for like 8 hours and attempt to use it again i always get this exception

I read that MySQL times out connections that are not active for a period of time, is there a solution in Hibernate to prevent this from happening
Edvins Reisons
Ranch Hand

Joined: Dec 11, 2006
Posts: 364
How are your connections configured and managed? Things like data source, connection pool,...
I agree. Here's the link:
subject: Hibernate Preventing Connection Timeouts
It's not a secret anymore!