Class XAException
java.lang.Object
java.lang.Throwable
java.lang.Exception
javax.transaction.xa.XAException
- All Implemented Interfaces:
Serializable
The XAException is thrown by the Resource Manager (RM) to inform the
Transaction Manager of an error encountered by the involved transaction.
- Since:
- 1.4
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionintThe error code with which to create the SystemException.static final intThe transaction branch has been heuristically committed.static final intThe transaction branch may have been heuristically completed.static final intThe transaction branch has been heuristically committed and rolled back.static final intThe transaction branch has been heuristically rolled back.static final intResumption must occur where the suspension occurred.static final intThe inclusive lower bound of the rollback codes.static final intIndicates that the rollback was caused by a communication failure.static final intA deadlock was detected.static final intThe inclusive upper bound of the rollback error code.static final intA condition that violates the integrity of the resource was detected.static final intThe resource manager rolled back the transaction branch for a reason not on this list.static final intA protocol error occurred in the resource manager.static final intIndicates that the rollback was caused by an unspecified reason.static final intA transaction branch took too long.static final intMay retry the transaction branch.static final intThe transaction branch was read-only and has been committed.static final intRoutine returned with no effect and may be reissued.static final intThere is an asynchronous operation already outstanding.static final intThe XID already exists.static final intInvalid arguments were given.static final intThe XID is not valid.static final intThe resource manager is doing work outside a global transaction.static final intRoutine was invoked in an improper context.static final intA resource manager error has occurred in the transaction branch.static final intResource manager is unavailable. -
Constructor Summary
ConstructorsConstructorDescriptionCreate an XAException.XAException(int errcode) Create an XAException with a given error code.Create an XAException with a given string. -
Method Summary
Methods declared in class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringModifier and TypeMethodDescriptionfinal voidaddSuppressed(Throwable exception) The specified exception is going to be suppressed in order to give priority to this exception (primary exception) and to be appended to the list of suppressed exceptions.Record in the receiver a walkback from the point where this message was sent.getCause()Answers the cause of this Throwable, or null if there is no cause.Answers the extra information message which was provided when the throwable was created.Answers the extra information message which was provided when the throwable was created.Answers an array of StackTraceElement.final Throwable[]Returns an array of exceptions suppressed, typically by the automatically generated code from the try-with-resources statement, in order to give priority to this exception (primary exception).Initialize the cause of the receiver.voidOutputs a printable representation of the receiver's walkback on the System.err stream.voidOutputs a printable representation of the receiver's walkback on the stream specified by the argument.voidOutputs a printable representation of the receiver's walkback on the writer specified by the argument.voidsetStackTrace(StackTraceElement[] trace) Sets the array of StackTraceElements.toString()Answers a string containing a concise, human-readable description of the receiver.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.booleanCompares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.inthashCode()Answers an integer hash code for the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
Field Details
-
errorCode
public int errorCodeThe error code with which to create the SystemException. -
XA_RBBASE
public static final int XA_RBBASEThe inclusive lower bound of the rollback codes.- See Also:
-
XA_RBROLLBACK
public static final int XA_RBROLLBACKIndicates that the rollback was caused by an unspecified reason.- See Also:
-
XA_RBCOMMFAIL
public static final int XA_RBCOMMFAILIndicates that the rollback was caused by a communication failure.- See Also:
-
XA_RBDEADLOCK
public static final int XA_RBDEADLOCKA deadlock was detected.- See Also:
-
XA_RBINTEGRITY
public static final int XA_RBINTEGRITYA condition that violates the integrity of the resource was detected.- See Also:
-
XA_RBOTHER
public static final int XA_RBOTHERThe resource manager rolled back the transaction branch for a reason not on this list.- See Also:
-
XA_RBPROTO
public static final int XA_RBPROTOA protocol error occurred in the resource manager.- See Also:
-
XA_RBTIMEOUT
public static final int XA_RBTIMEOUTA transaction branch took too long.- See Also:
-
XA_RBTRANSIENT
public static final int XA_RBTRANSIENTMay retry the transaction branch.- See Also:
-
XA_RBEND
public static final int XA_RBENDThe inclusive upper bound of the rollback error code.- See Also:
-
XA_NOMIGRATE
public static final int XA_NOMIGRATEResumption must occur where the suspension occurred.- See Also:
-
XA_HEURHAZ
public static final int XA_HEURHAZThe transaction branch may have been heuristically completed.- See Also:
-
XA_HEURCOM
public static final int XA_HEURCOMThe transaction branch has been heuristically committed.- See Also:
-
XA_HEURRB
public static final int XA_HEURRBThe transaction branch has been heuristically rolled back.- See Also:
-
XA_HEURMIX
public static final int XA_HEURMIXThe transaction branch has been heuristically committed and rolled back.- See Also:
-
XA_RETRY
public static final int XA_RETRYRoutine returned with no effect and may be reissued.- See Also:
-
XA_RDONLY
public static final int XA_RDONLYThe transaction branch was read-only and has been committed.- See Also:
-
XAER_ASYNC
public static final int XAER_ASYNCThere is an asynchronous operation already outstanding.- See Also:
-
XAER_RMERR
public static final int XAER_RMERRA resource manager error has occurred in the transaction branch.- See Also:
-
XAER_NOTA
public static final int XAER_NOTAThe XID is not valid.- See Also:
-
XAER_INVAL
public static final int XAER_INVALInvalid arguments were given.- See Also:
-
XAER_PROTO
public static final int XAER_PROTORoutine was invoked in an improper context.- See Also:
-
XAER_RMFAIL
public static final int XAER_RMFAILResource manager is unavailable.- See Also:
-
XAER_DUPID
public static final int XAER_DUPIDThe XID already exists.- See Also:
-
XAER_OUTSIDE
public static final int XAER_OUTSIDEThe resource manager is doing work outside a global transaction.- See Also:
-
-
Constructor Details
-
XAException
public XAException()Create an XAException. -
XAException
Create an XAException with a given string.- Parameters:
s- TheStringobject containing the exception message.
-
XAException
public XAException(int errcode) Create an XAException with a given error code.- Parameters:
errcode- The error code identifying the exception.
-