- /*
- * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
- * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
- */
-
- package javax.transaction.xa;
-
- /**
- * The XAException is thown by the Resource Manager (RM) to inform the
- * Transaction Manager of error encountered for the transaction involved.
- *
- */
- public class XAException extends java.lang.Exception {
-
- /**
- * The error code to create the SystemException with
- *
- * @serial The error code for the exception
- */
-
- public int errorCode;
-
- /**
- * Create an XAException.
- */
- public XAException()
- {
- super();
- }
-
- /**
- * Create an XAException with a given string.
- */
- public XAException(String s)
- {
- super(s);
- }
-
- /**
- * Create an XAException with a given error code.
- */
- public XAException(int errcode)
- {
- super();
- errorCode = errcode;
- }
-
- /**
- * The inclusive lower bound oof the rollback codes.
- */
- public final static int XA_RBBASE = 100;
-
- /**
- * Rollback was caused by unspecified reason.
- */
- public final static int XA_RBROLLBACK = XA_RBBASE;
-
- /**
- * Rollback was caused by communication failure.
- */
- public final static int XA_RBCOMMFAIL = XA_RBBASE + 1;
-
- /**
- * A deadlock was detected.
- */
- public final static int XA_RBDEADLOCK = XA_RBBASE + 2;
-
- /**
- * A condition that violates the integrity of the resource was detected.
- */
- public final static int XA_RBINTEGRITY = XA_RBBASE + 3;
-
- /**
- * The resource manager rolled back the transaction branch for a reason
- * not on this list.
- */
- public final static int XA_RBOTHER = XA_RBBASE + 4;
-
- /**
- * A protocol error occured in the resource manager.
- */
- public final static int XA_RBPROTO = XA_RBBASE + 5;
-
- /**
- * A transaction branch took too long.
- */
- public final static int XA_RBTIMEOUT = XA_RBBASE + 6;
-
- /**
- * May retry the transaction branch.
- */
- public final static int XA_RBTRANSIENT = XA_RBBASE + 7;
-
- /**
- * The inclusive upper bound of the rollback error code.
- */
- public final static int XA_RBEND = XA_RBTRANSIENT;
-
- /**
- * Resumption must occur where suspension occured.
- */
- public final static int XA_NOMIGRATE = 9;
-
- /**
- * The transaction branch may have been heuristically completed.
- */
- public final static int XA_HEURHAZ = 8;
-
- /**
- * The transaction branch has been heuristically committed.
- */
- public final static int XA_HEURCOM = 7;
-
- /**
- * The transaction branch has been heuristically rolled back.
- */
- public final static int XA_HEURRB = 6;
-
- /**
- * The transaction branch has been heuristically committed and
- * rolled back.
- */
- public final static int XA_HEURMIX = 5;
-
- /**
- * Routine returned with no effect and may be reissued.
- */
- public final static int XA_RETRY = 4;
-
- /**
- * The transaction branch has been read-only and has been committed.
- */
- public final static int XA_RDONLY = 3;
-
- /**
- * Asynchronous operation already outstanding.
- */
- public final static int XAER_ASYNC = -2;
-
- /**
- * A resource manager error has occured in the transaction branch.
- */
- public final static int XAER_RMERR = -3;
-
- /**
- * The XID is not valid.
- */
- public final static int XAER_NOTA = -4;
-
- /**
- * Invalid arguments were given.
- */
- public final static int XAER_INVAL = -5;
-
- /**
- * Routine was invoked in an inproper context.
- */
- public final static int XAER_PROTO = -6;
-
- /**
- * Resource manager is unavailable.
- */
- public final static int XAER_RMFAIL = -7;
-
- /**
- * The XID already exists.
- */
- public final static int XAER_DUPID = -8;
-
- /**
- * The resource manager is doing work outside global transaction.
- */
- public final static int XAER_OUTSIDE = -9;
-
-
- }