Interface TransactionImport
-
- All Known Implementing Classes:
TransactionManagerHelper
public interface TransactionImportTransaction Manager extensions to support transaction inflow w/o resource adapter.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetTransactionRemainingTimeout()Return duration before current transaction would timeout.jakarta.resource.spi.XATerminatorgetXATerminator()Provides a handle to aXATerminatorinstance.voidrecreate(Xid xid, long timeout)Recreate a transaction based on the Xid.voidregisterRecoveryResourceHandler(XAResource xaResource)Allows an arbitrary XAResource to register for recoveryvoidrelease(Xid xid)Release a transaction.
-
-
-
Method Detail
-
recreate
void recreate(Xid xid, long timeout)
Recreate a transaction based on the Xid. This call causes the calling thread to be associated with the specified transaction.This method imports a transactional context controlled by an external transaction manager.
- Parameters:
xid- the Xid object representing a transaction.
-
release
void release(Xid xid)
Release a transaction. This call causes the calling thread to be dissociated from the specified transaction.This call releases transactional context imported by recreate method.
- Parameters:
xid- the Xid object representing a transaction.
-
getXATerminator
jakarta.resource.spi.XATerminator getXATerminator()
Provides a handle to aXATerminatorinstance.The XATerminator exports 2PC protocol control to an external root transaction coordinator.
- Returns:
- a
XATerminatorinstance.
-
getTransactionRemainingTimeout
int getTransactionRemainingTimeout() throws jakarta.transaction.SystemExceptionReturn duration before current transaction would timeout.- Returns:
- Returns the duration in seconds before current transaction would timeout. Returns zero if transaction has no timeout set and returns negative value if transaction already timed out.
- Throws:
IllegalStateException- Thrown if the current thread is not associated with a transaction.jakarta.transaction.SystemException- Thrown if the transaction manager encounters an unexpected error condition.
-
registerRecoveryResourceHandler
void registerRecoveryResourceHandler(XAResource xaResource)
Allows an arbitrary XAResource to register for recovery- Parameters:
xaResource- XAResource to register for recovery
-
-