Interface NestableTransactionManager

All Superinterfaces:
Remote, TransactionConstants, TransactionManager

public interface NestableTransactionManager extends TransactionManager
The interface used for managers of the two-phase commit protocol for nestable transactions. All nestable transactions must have a transaction manager that runs this protocol.
Since:
1.0
Author:
Sun Microsystems, Inc.
See Also:
  • Method Details

    • create

      Begin a nested transaction, with the specified transaction as parent.
      Parameters:
      parentMgr - the manager of the parent transaction
      parentID - the id of the parent transaction
      lease - the requested lease time for the transaction
      Returns:
      the created transaction and the lease granted
      Throws:
      UnknownTransactionException - if the transaction is unknown to the transaction manager, either because the transaction ID is incorrect or because the transaction is complete and its state has been discarded by the manager.
      CannotJoinException - if the transaction is known to the manager but is no longer active.
      LeaseDeniedException - if this manager is unwilling to grant the requested lease time
      RemoteException - if there is a communication error
    • promote

      Promote the listed participants into the specified transaction. This method is for use by the manager of a subtransaction when the subtransaction commits. At this point, all participants of the subtransaction must become participants in the parent transaction. Prior to this point, the subtransaction's manager was a participant of the parent transaction, but after a successful promotion it need no longer be one (if it was not itself a participant of the subtransaction), and so it may specify itself as a participant to drop from the transaction. Otherwise, participants should not be dropped out of transactions. For each promoted participant, the participant's crash count is stored in the corresponding element of the crashCounts array.
      Parameters:
      id - the id of the parent transaction
      parts - the participants being promoted to the parent
      crashCounts - the crash counts of the participants
      drop - the manager to drop out, if any
      Throws:
      CrashCountException - if the crash count provided for at least one participant differs from the crash count in a previous invocation of the same pairing of participant and transaction
      UnknownTransactionException - if a transaction is unknown to the transaction manager, either because the transaction ID is incorrect or because the transaction is complete and its state has been discarded by the manager.
      CannotJoinException - if a transaction is known to the manager but is no longer active.
      RemoteException - if there is a communication error
      See Also: