Problem:
- Product Name: AppServer
- Product Version: 6.6
- Product Component: Distributed Transaction
What are the possible error codes on XAException between resource and transaction manager in a distributed transaction?
Application may access data through multiple database connections and each database connection is enlisted with transaction manager. The transaction manager obtains an XAResource for each connection participating in a global transaction.
The transaction manager uses the start method to associate the global transaction with the resource. The resource manager error has occured with different Error codes {ie. [-2][-3][-4][-5][-6][-7][-8]}
The following is a sample error message in the logs:
2009-05-08 11:26:04,589 ERROR - secdb: XaTransactionXAResource [secdb] start for xid = [XID[ {formatId = 1447646025},{globalTransactionId(length = 64)(contents= 86 73 83 73 1 0 0 0 -84 39 5 45 0 0 -39 -70 111 116 115 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 74 3 -55 116 0 0 0 0 -128 -5 0 -35)} , branchQualifier(length = 24)(contents= 91 66 81 58 49 50 52 49 53 50 51 56 54 48 56 54 55 58 -84 39 5 45 44 0)} with flags = [0] with flags = [TMNOFLAGS XAException with Errorcode [-6]
Resolution:
The possible error codes within "javax.transaction.xa.XAException" in a distributed transaction are the following:
- ErrorCode:2 - is XAER_ASYNC - Asynchronous operation already outstanding.
- ErrorCode:3 - is XAER_RMERR - A resource manager error has occured in the transaction branch
- ErrorCode:4 - is XAER_NOTA - The XID is not valid
- ErrorCode:5 - is XAER_INVAL - Invalid arguments were given
- ErrorCode:6 - is XAER_PROTO (incorrect context). When returned from XA_START, this error code indicates an active global transaction branch has been associated with the session. This error may be caused by a bug in the application server. A Google search on XAER_PROTO turns up several references to such bugs in various app servers or a problem in your application code.
- ErrorCode:7 - is XAER-RMFAIL - Resource manager is unavailable.
- ErrorCode:8 - is XAER_DUPID - The XID already exists
Reference for XAResource :
- http://docs.oracle.com/javaee/1.4/api/javax/transaction/xa/XAResource.html
- http://docs.oracle.com/javaee/1.4/api/javax/transaction/xa/XAException.html
#AppServer
#Security
#XAException
#XAResource
#DistributedTransaction
#VisiBroker