Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to reconnect to the database after the jdbc drops the connection

654325Aug 8 2008 — edited Aug 11 2008
I am new to toplink/jpa . I am builiding a web application and using mysql database. Every day when I open the site, I get the Communication failure exception saying the idle time exceeded the wait_timeout and I should try reconnection using Connector/J or using property autoreconnect=true.

In the persistence.xml i used autoReconnect= true. but I still get the same exception.

I can catch this exception but I want to know how can I reconnect using the instance of entityManagetFactory(emf) which is being created at the start of the application.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 8 2008
Added on Aug 8 2008
2 comments
3,162 views