Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-2807

TxConnectionManager needs to set XA errorCode of JBossLocalXAException

XMLWordPrintable

      File: jboss-4.0.1sp1-src/connector/src/main/org/jboss/resource/connectionmanager/TxConnectionManager.java
      Version $Revision: 1.25.2.1.2.1 $
      Bundle: jboss-4.0.4RC1
      Description:

      When a JBossLocalXAException is thrown, the errorCode should be set as this is relevant to the base XAException. JBossLocalXAException probably needs a new creation method that takes a (String, int, Throwable)

      There are a bunch of instances where errorCode info whould help but one in particular should be fixed. line:702.
      The commit failure can be captured as an XA errorCode.

      here is an example stack trace with the resulting UNKNOWN message from the default errorCode value 0.

      2006-02-14 12:06:44,880 WARN [org.jboss.tm.TransactionImpl] XAException: tx=TransactionImpl:XidImpl[FormatId=257,GlobalId=jupiter/16, BranchQual=, localId=16] errorCode=XA_UNKNOWN(0)
      org.jboss.resource.connectionmanager.JBossLocalXAException: could not commit local tx; - nested throwable: (javax.resource.spi.LocalTransactionException: commit failed)
      at org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.commit(TxConnectionManager.java:702)
      at org.jboss.tm.TransactionImpl$Resource.commit(TransactionImpl.java:2141)
      at org.jboss.tm.TransactionImpl.prepareResources(TransactionImpl.java:1612)
      at org.jboss.tm.TransactionImpl.prepare(TransactionImpl.java:855)
      at org.jboss.tm.TxManager.prepare(TxManager.java:603)
      at com.iona.jca.artix.XATerminatorWrapper.prepare(XATerminatorWrapper.java:54)
      at com.iona.jbus.runtime.transaction.XAResourceWrapper.xaPrepare(XAResourceWrapper.java:56)
      Caused by: javax.resource.spi.LocalTransactionException: commit failed
      at com.iona.jca.artix.LocalTransactionImpl.commit(LocalTransactionImpl.java:98)
      at org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.commit(TxConnectionManager.java:695)
      ... 6 more

              adrian.brock Adrian Brock (Inactive)
              gtully_jira Gary Tully (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: