Package org.wildfly.transaction.client
Interface XAOutflowHandle
public interface XAOutflowHandle
A handle for the outflow of an XA transactional resource.
In certain circumstances, if all outflowing transactions forget the enlistment or it is owned by another node,
the transaction may be resolved at prepare directly with an XA_RDONLY status, or it may be completely
removed from the transaction before it completes, allowing more efficient transaction resolution as well as
correct behavior in the presence of outflow cycles.
- Author:
- David M. Lloyd
-
Method Summary
Modifier and TypeMethodDescriptionstatic XAOutflowHandlecreateSimple(Xid xid, int timeout) Create a simple, no-operation outflow handle.voidSignal that this enlistment may be forgotten.intGet an estimated remaining timeout for this transaction.getXid()Get the XID of the transaction.voidSignal that the peer already had the transaction in question.voidSignal that this enlistment should be activated effective immediately.
-
Method Details
-
getRemainingTime
int getRemainingTime()Get an estimated remaining timeout for this transaction.- Returns:
- the timeout, in seconds (0 indicates that the timeout has likely already expired)
-
forgetEnlistment
void forgetEnlistment()Signal that this enlistment may be forgotten. -
nonMasterEnlistment
void nonMasterEnlistment()Signal that the peer already had the transaction in question. It may have been created previously by this node, or by another node. When there are no outstanding handles, if the corresponding subordinate enlistment has not been verified, and this method was called at least once, then the enlistment may be assumed to be owned by someone else and subsequent outstanding handles will not prevent the transaction from completing. -
verifyEnlistment
void verifyEnlistment() throws jakarta.transaction.RollbackException, jakarta.transaction.SystemExceptionSignal that this enlistment should be activated effective immediately. If any outflowing transactions verify the enlistment, then the enlistment is verified for all.- Throws:
jakarta.transaction.RollbackException- if the transaction was rolled back before the enlistment could be activatedjakarta.transaction.SystemException- if the enlistment failed for an unexpected reason
-
getXid
Get the XID of the transaction.- Returns:
- the XID of the transaction (must not be
null)
-
createSimple
Create a simple, no-operation outflow handle.- Parameters:
xid- the transaction ID (must not benull)timeout- the estimated remaining time, in seconds- Returns:
- the outflow handle (not
null)
-