Interface TransactionImport

  • All Known Implementing Classes:
    TransactionManagerHelper

    public interface TransactionImport
    Transaction Manager extensions to support transaction inflow w/o resource adapter.
    • 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 a XATerminator instance.

        The XATerminator exports 2PC protocol control to an external root transaction coordinator.

        Returns:
        a XATerminator instance.
      • getTransactionRemainingTimeout

        int getTransactionRemainingTimeout()
                                    throws jakarta.transaction.SystemException
        Return 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