Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.jini.core.transaction.server
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
See Also:
  `NestableServerTransaction`, `TransactionParticipant`

Nested Class Summary

Nested classes inherited from class net.jini.core.transaction.server.TransactionManager
`TransactionManager.Created`

Field Summary

Fields inherited from interface net.jini.core.transaction.server.TransactionConstants
`ABORTED, ACTIVE, COMMITTED, NOTCHANGED, PREPARED, VOTING`

Method Summary
`TransactionManager.Created` | `create(NestableTransactionManager parentMgr, long parentID, long lease)` Begin a nested transaction, with the specified transaction as parent.
`void` | `promote(long id, TransactionParticipant[] parts, long[] crashCounts, TransactionParticipant drop)` Promote the listed participants into the specified transaction.

Methods inherited from interface net.jini.core.transaction.server.TransactionManager
`abort, abort, commit, commit, create, getState, join`

Method Detail

### create

    public TransactionManager.Created create(NestableTransactionManager parentMgr,
                                             long parentID,
                                             long lease)
                                      throws UnknownTransactionException,
                                             CannotJoinException,
                                             LeaseDeniedException,
                                             RemoteException

  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

    public void promote(long id,
                        TransactionParticipant[] parts,
                        long[] crashCounts,
                        TransactionParticipant drop)
                 throws UnknownTransactionException,
                        CannotJoinException,
                        CrashCountException,
                        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 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:
    `TransactionManager.join(long, net.jini.core.transaction.server.TransactionParticipant, long)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Sun Microsystems, Inc. All rights reserved