-->
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.  [ 4 posts ] 
Author Message
 Post subject: What would cause hibernate not to recover from pool exhaust?
PostPosted: Wed Oct 28, 2009 12:54 pm 
Newbie

Joined: Wed Aug 19, 2009 10:55 am
Posts: 6
Our application uses hibernate with c3p0. Around 12:00 am at night the database runs a backup along with other scheduled jobs and around this time hibernate will lose all connection with the database. We keep getting a pool exhausted exception in the log files. Here is the strange part some nights the application will reconnect back to the database and other nights it will not reconnect. Any ideas what could cause hibernate not to recover from a pool exhausted exception? Here is the configuration for the hibernate.xml file.

<?xml version="1.0" encoding="UTF-8"?>
<hibernate-configuration>
<session-factory>
<property name="connection.driver_class">com.ibm.as400.access.AS400JDBCDriver</property>
prompt=false</property>
<property name="connection.username">QEHH</property>
<property name="connection.password">qaz1</property>
<property name="connection.pool_size">5</property>
<property name="dialect">org.hibernate.dialect.DB2Dialect</property>
<property name="current_session_context_class">thread</property>
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<property name="show_sql">true</property>

<!-- c3p0 properties -->
<property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
<property name="c3p0.max_size">100</property>
<property name="c3p0.max_statements">0</property>
<property name="c3p0.min_size">0</property>
<property name="c3p0.timeout">30</property>
<property name="c3p0.idleConnectionTestPeriod">300</property>
<mapping resource="conuser-mapping.hbm.xml"></mapping>
<mapping resource="user-mapping.hbm.xml"></mapping>
<mapping resource="new-user-mapping.hbm.xml"></mapping>
<mapping resource="events-mapping.hbm.xml"></mapping>
<mapping resource="survey-mapping.hbm.xml"></mapping>
</session-factory>
</hibernate-configuration>


Top
 Profile  
 
 Post subject: Re: What would cause hibernate not to recover from pool exhaust?
PostPosted: Wed Oct 28, 2009 11:34 pm 
Newbie

Joined: Wed Oct 28, 2009 11:32 pm
Posts: 1
Hello,

Have you fixed the problem yet?

I have the same problem with MSSQL.


Top
 Profile  
 
 Post subject: Re: What would cause hibernate not to recover from pool exhaust?
PostPosted: Thu Oct 29, 2009 9:06 am 
Newbie

Joined: Wed Aug 19, 2009 10:55 am
Posts: 6
I was researching it, but did not find a solution.


Top
 Profile  
 
 Post subject: Re: What would cause hibernate not to recover from pool exhaust?
PostPosted: Fri Nov 06, 2009 10:01 am 
Newbie

Joined: Wed Aug 19, 2009 10:55 am
Posts: 6
We tried the c3p0 property.

<property name="c3p0.idleConnectionTestPeriod">300</property>

It been working for a while now.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.