Package io.agroal.narayana
Class XAExceptionUtils
java.lang.Object
io.agroal.narayana.XAExceptionUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisUnilateralRollbackOnAbort(int returnCode, int flags) Function that returns true if the returnCode is one of the Rollback-only codes and the flags match TMFAIL.static XAExceptionxaException(int errorCode) static XAExceptionxaException(int errorCode, String message) static XAExceptionxaException(int errorCode, String message, Throwable cause) static XAExceptionxaException(int errorCode, Throwable cause)
-
Constructor Details
-
XAExceptionUtils
public XAExceptionUtils()
-
-
Method Details
-
xaException
-
xaException
-
xaException
-
xaException
-
isUnilateralRollbackOnAbort
public static boolean isUnilateralRollbackOnAbort(int returnCode, int flags) Function that returns true if the returnCode is one of the Rollback-only codes and the flags match TMFAIL.This function describes the TMFAIL case from page 38 of The XA Specification:
The portion of work has failed. A resource manager might choose to mark a transaction branch as rollback-only at this point. In fact, a transaction manager does so for the global transaction. If a resource manager chooses to do so also, xa_end() returns one of the [XA_RB∗] values. TMFAIL cannot be used in conjunction with either TMSUSPEND or TMSUCCESS
- Parameters:
returnCode- returnCode that was returned by the RMflags- flags that were used to call the method on the XAResource- Returns:
- true is flags matches TMFAIL and returnCode is one of the defined XA_RB* codes
-