net.jini.core.transaction.server
Interface NestableTransactionManager
- public abstract 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.
- See Also:
NestableServerTransaction
,
TransactionParticipant
create
public TransactionManager.Created create(NestableTransactionManager parentMgr,
long parentID,
long lease)
throws UnknownTransactionException,
CannotJoinException,
LeaseDeniedException,
java.rmi.RemoteException
- Begin a nested transaction, with the specified transaction as parent.
- Parameters:
parentMgr
- the manager of the parent transactionparentID
- the id of the parent transactionlease
- the requested lease time for the transaction
promote
public void promote(long id,
TransactionParticipant[] parts,
long[] crashCounts,
TransactionParticipant drop)
throws UnknownTransactionException,
CannotJoinException,
CrashCountException,
java.rmi.RemoteException
- 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 transactionparts
- the participants being promoted to the parentcrashCounts
- the crash counts of the participantsdrop
- the manager to drop out, if any- Throws:
- CrashCountException - the crash count of some (at least one)
participant is different from the crash count the manager already
knows about for that participant
- See Also:
TransactionManager.join(long, net.jini.core.transaction.server.TransactionParticipant, long)
Copyright © 1999 Sun Microsystems, Inc. All rights reserved