3 Replies Latest reply on Feb 3, 2005 12:48 AM by Adrian Brock

    no ManagedConnections after timeouts

    Albert Tam Newbie


      We're using jBoss 3.2.2 and are encountering:

      No ManagedConnections available within configured blocking timeout ( 5000 [ms] ); - nested throwable: (javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 5000 [ms] ))

      I have a small test case where we do a sleep in our ejb to cause the
      transaction to time out (I set it to 30 seconds). If I run this case enough
      the AvailableConnectionCount from the org.jboss.resource.connectionmanager.JBossManagedConnectionPool
      mbean in the jmx-console reports 0 connections available.

      The code to fetch a connection is wrapped with the try...finally block
      to ensure that the connection is released. However, with the sleep we
      never fetch a connection. The exception trace is:

      18:13:01,647 INFO [TxConnectionManager] Could not enlist XAResource!
      javax.transaction.RollbackException: Already marked for rollback
      at org.jboss.tm.TransactionImpl.enlistResource(TransactionImpl.java:596)

      at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnection
      at org.jboss.resource.connectionmanager.TxConnectionManager.managedConne
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateC
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$Connectio
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(Wrapp

      I can reset the AvailableConnectionCount back to its maximum by
      invoking flush() from the jmx-console; however this is not practical.

      It appears that transactions that time out do not release their connections
      back to the pool. Has this issue been resolved in a newer release?