transaction
Interface ITransactionManager

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
TransactionManagerImpl

public interface ITransactionManager
extends java.rmi.Remote


Field Summary
static java.lang.String RMI_TM_NAME
           
 
Method Summary
 boolean abort(int globalXID)
          Abort a distributed transaction.
 int begin()
          Begin a new distributed transaction.
 boolean commit(int globalXID)
          Commit a distributed transaction.
 boolean enlist(java.lang.String resourceManagerRMIName, int globalXID)
          Enlist a resource manager with the given name to the list of participants for the given distributed transaction.
 

Field Detail

RMI_TM_NAME

static final java.lang.String RMI_TM_NAME
See Also:
Constant Field Values
Method Detail

begin

int begin()
          throws java.rmi.RemoteException
Begin a new distributed transaction.

Returns:
a globally unique transaction id
Throws:
java.rmi.RemoteException

commit

boolean commit(int globalXID)
               throws TransactionAbortedException,
                      InvalidTransactionException,
                      java.rmi.RemoteException
Commit a distributed transaction. Initializes the 2PC protocol.

Parameters:
globalXID - the id of the distributed transaction
Returns:
true on success, false otherwise
Throws:
TransactionAbortedException
InvalidTransactionException
java.rmi.RemoteException

abort

boolean abort(int globalXID)
              throws TransactionAbortedException,
                     InvalidTransactionException,
                     java.rmi.RemoteException
Abort a distributed transaction.

Parameters:
globalXID - the id of the distributed transaction
Returns:
true on success, false otherwise
Throws:
TransactionAbortedException
InvalidTransactionException
java.rmi.RemoteException

enlist

boolean enlist(java.lang.String resourceManagerRMIName,
               int globalXID)
Enlist a resource manager with the given name to the list of participants for the given distributed transaction.

Parameters:
resourceManagerRMIName - the RMI name of the RM
globalXID - the id of the distributed transaction
Returns:
true on success, false otherwise