我们在jBoss Application Server 7.0.1中托管了一个Web应用程序(使用jBPM框架)。最近,我们在生产服务器中收到以下异常:
Caused by: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/TASKORMDS
据我所知,“IJ000453:无法获得托管连接”仅在连接池已耗尽其所有最大连接(按上述配置为100)并且无法获取任何新连接时发生。但是,在上述生产服务器中的异常期间,此特定数据库(task_details)的数据库服务器中的打开/活动连接数为1或2.我们获取此信息,因为我们已在数据库服务器中记录了连接信息。
我们还在测试环境中执行了jMeter测试,我们可以看到在数据库服务器中打开了许多连接。这对我们来说很奇怪,因为异常“IJ000453:无法获得托管连接”在生产服务器中发生,即使我们在数据库服务器中将Max连接设置为100并且只打开了1或2个连接。
我们在jBoss服务器中对数据源TASKORMDS进行了以下配置:
<datasource jndi-name="java:jboss/datasources/TASKORMDS" pool-name="MySqlDS" enabled="true" jta="true" use-java-context="true" use-ccm="true">
<connection-url>
jdbc:mysql://livedb.co.in:3306/task_details
</connection-url>
<driver>
com.mysql
</driver>
<transaction-isolation>
TRANSACTION_READ_COMMITTED
</transaction-isolation>
<pool>
<min-pool-size>
10
</min-pool-size>
<max-pool-size>
100
</max-pool-size>
<prefill>
false
</prefill>
<use-strict-min>
false
</use-strict-min>
<flush-strategy>
FailingConnectionOnly
</flush-strategy>
</pool>
<security>
<user-name>
xxxxx
</user-name>
<password>
xxxxx
</password>
</security>
<validation>
<check-valid-connection-sql>
select 1
</check-valid-connection-sql>
<validate-on-match>
true
</validate-on-match>
<background-validation>
false
</background-validation>
<use-fast-fail>
false
</use-fast-fail>
</validation>
<timeout>
<blocking-timeout-millis>
60000
</blocking-timeout-millis>
<idle-timeout-minutes>
60000
</idle-timeout-minutes>5.4.0.Final
<set-tx-query-timeout/>
</timeout>
<statement>
<prepared-statement-cache-size>
0
</prepared-statement-cache-size>
</statement>
</datasource>
请在下面找到例外信息:
Caused by: java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/TASKORMDS
at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:137)
at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:92) [hibernate-core-3.6.9.Final.jar:]
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446) [hibernate-core-3.6.9.Final.jar:]
... 86 more
Caused by: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/TASKORMDS
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:394)
at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:367)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:467)
at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:129)
... 88 more
Caused by: javax.resource.ResourceException: IJ000655: No managed connections available within configured blocking timeout (5000 [ms])
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:355)
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:392)
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:357)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:351)
如果您需要任何其他详细信息,请告知我们。任何帮助都很有用。
谢谢&amp;的问候,
Hemaraj