11 Replies Latest reply on Jan 8, 2010 11:58 AM by kunal sengupta

    Connection with associated transaction in invalid state is placed back in the pool?

    kunal sengupta Newbie

      We have a customer implemented on 4.2.2 and MSSql 2005. They intermittantly get the following exception in the UI.

       

      java.lang.RuntimeException: Error obtaining connection: org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: a121b27:554e:4a165703:2cef816 status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: a121b27:554e:4a165703:2cef816 status: ActionStatus.ABORT_ONLY >))

       

      This implies that a connection with invalid transaction is put back in the connection pool and when a new connection is requested using the data source and the same transaction is returned from the pool we get the above exception.

       

      Is this a bug in the jboss code? Or is there are way by which we can correct this?

       

      We tried to catch the exception in the our factory class which gets the connections. In the catch block we invoke the flush method of the ConnectionPoolManager Mbean. But this seems to be a little risky.

       

      Please suggest if there is a patch or a workaround for this issue?