com.sun.enterprise.transaction.api
Interface TransactionImport


public interface TransactionImport

Transaction Manager extensions to support transaction inflow w/o resource adapter.


Method Summary
 int getTransactionRemainingTimeout()
          Return duration before current transaction would timeout.
 XATerminator getXATerminator()
          Provides a handle to a XATerminator instance.
 void recreate(Xid xid, long timeout)
          Recreate a transaction based on the Xid.
 void registerRecoveryResourceHandler(XAResource xaResource)
          Allows an arbitrary XAResource to register for recovery
 void release(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

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 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:
java.lang.IllegalStateException - Thrown if the current thread is not associated with a 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


Copyright © 2012 GlassFish Community. All Rights Reserved.