Hi,
Can anybody help me to solve this problem,
I have deployed an applcation on jobss server. The application calls a service (a java thread program) for every 1 minute. The service creates a connection using jboss server datasource and closes after accessing the database. Iam getting the following exception when the application is running
org.jboss.util.NestedSQLException: No ManagedConnections available within configured blocking timeout ( 5000 [ms] ); - nested throwable: (javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 5000 [ms] ))
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:106)
at j2ee.J2EEService.getConnection(J2EEService.java:159)
at db.DAO.getConnection(DAO.java:107)
at app.ServiceFile.run(ServiceFile.java:41)
at java.lang.Thread.run(Thread.java:536)
Caused by: javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 5000 [ms] )
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:249)
at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:529)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:442)
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:312)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:494)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:848)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
... 5 more
The following are the settings i have made in oracle-ds.xml file
<datasources>
<local-tx-datasource>
<jndi-name>OracleDS</jndi-name>
<connection-url>jdbc
racle:thin:@172.20.10.84:1521
MASS</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>CI</user-name>
<password>CI</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
</local-tx-datasource>
<depends optional-attribute-name="ManagedConnectionFactoryName">
<mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=LocalTxPool,name=OracleDS">
<attribute name="MinSize">5</attribute>
<attribute name="MaxSize">50</attribute>
<attribute name="BlockingTimeoutMillis">60000</attribute>
<attribute name="IdleTimeoutMinutes">15</attribute>
<attribute name="Criteria">ByContainer</attribute>
</mbean>
</depends>
</datasources>