-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Reconnecting to database after connection lost
PostPosted: Thu Sep 20, 2007 2:04 pm 
Newbie

Joined: Thu Sep 20, 2007 1:33 pm
Posts: 8
Ok, I looked in the FAQ and in the documentation and either I am blind, or I am not looking very well.

I need to implement database reconnection if the database goes down. I have a standalone application (not running under an app server) and if the database goes dow, I want it to try to connect periodically until the database is available again.

I am sure that this is simple to do, but I can't find where to do it.

I am using JPA to manage persistence.

Hibernate version: hibernate3-2.5, annotations 3.3.0, entitymanager 3.3.1, ejb3-persistence 3.0

Name and version of the database you are using: Postgres 8.2


This is probably documented somewhere already, and I'm just not using the right keywords.

Thanks,

L


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 20, 2007 3:38 pm 
Newbie

Joined: Thu Sep 20, 2007 1:33 pm
Posts: 8
After more searching, it looks like c3p0 is the way to go.

I added the itle_test property and the c3p0.jar to my class path ad it seems to work.

More extensive testingis needed, though.

L


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.