3 Replies Latest reply on Jun 30, 2006 4:59 AM by kconner

    Could not enlist XAResource!

    subramaniam.venkat

      Hello All,

      I am getting an exception

      -------------------------------------------------
      [org.jboss.resource.connectionmanager.TxConnectionManager] Could not enlist XAResource!
      javax.transaction.RollbackException: Already marked for rollback
      ---------------------------------------------------

      I am using JBoss.3.2.x . We have more than one database in our application. For the first database update or any operation is going fine but as soon as we are trying to get the connection for the second database we are getting this exception.

      We are using a local-tx-datasource datasource in our application.
      We are also using spring framework for database.
      Can anyone please let me know why are we getting this exception.
      I would be really very thankful for the help.

      Awaiting Reply,
      Anand

        • 1. Re: Could not enlist XAResource!
          marklittle

          The transaction is marked for rollback (could be via an explicit call to setRollbackOnly or a transaction timeout, for example). In that case, you're not allowed to register any new participants.

          • 2. Re: Could not enlist XAResource!
            subramaniam.venkat

             

            "mark.little@jboss.com" wrote:
            The transaction is marked for rollback (could be via an explicit call to setRollbackOnly or a transaction timeout, for example). In that case, you're not allowed to register any new participants.



            Thanks for the feedaback.
            As you said we have EJB in our application,but we have called the setRollbackOnly only in the catch block and i also debugged the code and i saw that it never enter the catch block.
            And the transaction timeout is the default timeout of JBoss which is 300 secs.
            We have not mentioned any transaction tmeout in our application.
            Can you please let me know any further information which i can check

            Awaiting Reply
            Anand

            • 3. Re: Could not enlist XAResource!
              kconner

              There are a number of implicit points at which setRollbackOnly could be called on a transaction, you can find out more information by enabling logging on the org.jboss.tm.TransactionImpl class. From memory these include

              Transaction timeout
              Unchecked or RemoteException thrown from EJB method
              Failure in ejbStore