Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Unstable database connection causes EL to deadlock
Unstable database connection causes EL to deadlock [message #390288] Tue, 14 July 2009 17:56 Go to next message
Philipp Kursawe is currently offline Philipp KursaweFriend
Messages: 135
Registered: July 2009
Senior Member
Hello,

I am using a database on a VM over a VPN which is a highly unstable
connection. So it happens the either the VPN breaks down or the VM is
too slow to respond. EL does not seem to handle such situations very
well. Is there a method I could be notified when the connection breaks
down and to re-establish the connection? Maybe its just a timeout that
is very high in the default settings of EL that I could reduce to make
my app more responsive even when the connection breaks down.
I would like to create a job then, that tries to re-establish the
connection.

Thanks,
Phil
Re: Unstable database connection causes EL to deadlock [message #390296 is a reply to message #390288] Thu, 16 July 2009 14:13 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

You can use an ExceptionHandler in the EclipseLink Session to handle
connection issues, but EclipseLink should attempt to connect automatically
if the connection is lost (on a database failure you should see
EclipseLink pinging the database, then trying to reconnect). You can also
set a timeout on queries, and your JDBC driver may have other timeout
settings.

But in general, you might need to fix your network issues.

---
James
http://www.nabble.com/EclipseLink---Users-f26658.html


James : Wiki : Book : Blog : Twitter
Previous Topic:Problem with Foreign Composite Key sharing a field with a Primary Composite Key?
Next Topic:Calculations of field values using other tables
Goto Forum:
  


Current Time: Mon Dec 22 02:15:23 GMT 2014

Powered by FUDForum. Page generated in 0.01766 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software