3 Replies Latest reply on Feb 3, 2005 12:48 AM by adrian.brock

    no ManagedConnections after timeouts

    altam3

      Hi,

      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
      EventListener.enlist(TxConnectionManager.java:443)
      at org.jboss.resource.connectionmanager.TxConnectionManager.managedConne
      ctionReconnected(TxConnectionManager.java:343)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateC
      onnection(BaseConnectionManager2.java:483)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$Connectio
      nManagerProxy.allocateConnection(BaseConnectionManager2.java:814)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(Wrapp
      erDataSource.java:102)

      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?

      Thanks!!
      Albert

        • 1. Re: no ManagedConnections after timeouts
          markwolfe

          Any chance you could post or attach these test cases as I am having the same issues and I would like to have a look at the problem in more detail.

          Thanks a lot.

          • 2. Re: no ManagedConnections after timeouts
            aviananta

            I have this error too: No ManagedConnections available within configured blocking timeout ( 5000 [ms] );. I try to add .remove() after I have done with the ejb.create(), and the error message disappear. :) . Here my code:

            Object ref = jndiContext.lookup ("remoteDelivery");
            remoteDeliveryHome rdh = (remoteDeliveryHome)PortableRemoteObject.narrow (ref,remoteDeliveryHome.class);
            remoteDeliveryRemote rdr =rdh.create();
            rdr.remove();

            • 3. Re: no ManagedConnections after timeouts

              Moderated: Don't waste time reporting problems with old versions, try the latest version (3.2.7/4.0.1)