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: get exception in creating session if db is down
PostPosted: Wed Aug 06, 2008 11:20 am 
Newbie

Joined: Fri May 30, 2008 6:00 am
Posts: 1
I'm developing a standalone application using Hibernate (3.0) with c3p0 (0.9.1) as pool and local mysql as database.
I want to inform the user if database is not running, but all I get is an apparently infinite loop with this exception:

"An exception occurred while acquiring a poolable resource. Will retry."

and no exception are thrown to my application.

How can I catch this kind of exception?!

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 15, 2008 9:39 am 
Newbie

Joined: Wed Oct 15, 2008 9:34 am
Posts: 1
Location: Belgium
I've got the same problem.

In fact, you cannot catch the exception because c3p0 already catch it and then retry, again and again...

You can just not use c3p0, then the hibernate built-in connection pool will throw an exception.

But it's not recommended to use hibernate built-in connection pool in prod, so did-you find another way to correct the problem?


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.