Interface RemoteTransactionPeer
-
public interface RemoteTransactionPeer- Author:
- David M. Lloyd
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description SimpleTransactionControlbegin(int timeout)Establish a remote user-controlled transaction without local enlistment.default <T> TgetProviderInterface(Class<T> clazz)Get the provider interface with the given type for this peer.SubordinateTransactionControllookupXid(Xid xid)Look up an outflow handle for a remote transaction with the given XID.Xid[]recover(int flag, String parentName)Acquire a list of all unresolved subordinate transactions from the location associated with this provider.
-
-
-
Method Detail
-
lookupXid
@NotNull SubordinateTransactionControl lookupXid(Xid xid) throws XAException
Look up an outflow handle for a remote transaction with the given XID. The remote transaction is only looked up; no remote action should take place as a result of this call beyond correlating the XID in a protocol-specific manner. The given XID should only be examined for the global transaction ID; the branch ID should be ignored (and will usually be empty in any event).- Parameters:
xid- the transaction ID- Returns:
- the handle for the remote transaction
- Throws:
XAException- if the lookup failed for some reason
-
recover
@NotNull Xid[] recover(int flag, String parentName) throws XAException
Acquire a list of all unresolved subordinate transactions from the location associated with this provider.- Parameters:
flag- the recovery flagparentName- the parent node name- Returns:
- the (possibly empty) XID array
- Throws:
XAException- if an error occurs
-
begin
@NotNull SimpleTransactionControl begin(int timeout) throws jakarta.transaction.SystemException
Establish a remote user-controlled transaction without local enlistment.- Parameters:
timeout- the timeout of the transaction in seconds- Returns:
- the transaction handle (must not be
null) - Throws:
jakarta.transaction.SystemException- if an unexpected error occurs
-
getProviderInterface
default <T> T getProviderInterface(Class<T> clazz)
Get the provider interface with the given type for this peer.- Type Parameters:
T- the provider interface type- Parameters:
clazz- the provider interface type class (must not benull)- Returns:
- the provider interface with the given type, or
nullif no such interface is supported
-
-