Hibernate c3p0配置抛出TimeoutException

时间:2016-01-20 14:44:03

标签: java hibernate exception jboss c3p0

我已配置以下hibernate配置来解决数据库连接问题。但是在部署时我得到以下异常。我试图增加超时参数,但没有找到解决方案。

我使用JBoss AS 7.1作为Application Server和MySQL DB

休眠配置:

  <property name="hibernate.c3p0.min_size" value="5"/>
  <property name="hibernate.c3p0.max_size" value="20"/>
  <property name="hibernate.c3p0.timeout" value="300"/>
  <property name="hibernate.c3p0.max_statements" value="50"/>
  <property name="hibernate.c3p0.idle_test_period" value="3000"/>
  <property name="hibernate.connection.pool_size" value="30"/>

错误

Caused by: com.mchange.v2.resourcepool.TimeoutException: A client timed out while waiting to acquire a resource from 
com.mchange.v2.resourcepool.BasicResourcePool@5d43a38e -- timeout at awaitAvailable()
你能否提一下如何解决这个问题?

0 个答案:

没有答案