tyrex.tm.impl

Class ControlImpl

final class ControlImpl extends _ControlImplBase implements Control, RecoveryCoordinator

Implements a Control interface into a transaction. Transactions are implemented strictly by TransactionImpl, however when using the OTS API or communicating with other CORBA servers it is necessary to use the control interface. This object serves as lightweight adapter between the transaction and control interface.

Control objects are produced directly only by TransactionImpl and indirectly by TransactionFactory.

Version: $Revision: 1.4 $ $Date: 2001/03/21 20:02:48 $

Author: Assaf Arkin

See Also: Changes J. Daniel : Changed code to be compliant with CORBA developing rules.

Field Summary
protected TransIdentity[]_parents
The list of parents of this transaction, the immediate parent at index 0 and the top level parent at index n-1.
protected TransactionImpl_tx
The underlying transaction to which this control serves as an interface.
Constructor Summary
ControlImpl(TransactionImpl tx, PropagationContext pgContext)
Creates a new control for a transaction that has been imported using the specified propagation context.
ControlImpl(TransactionImpl tx)
Creates a new control for a local transaction that could be used to propagate the transaction to a different server.
Method Summary
protected voiddeactivate()
This operation is used to deactivate all CORBA objects.
protected CoordinatorgetCoordinator()
protected TransIdentitygetIdentity()
protected PropagationContextgetPropagationContext()
protected TerminatorgetTerminator()
TransactionImplgetTransaction()
Return the transaction object which this control interface represents.
Coordinatorget_coordinator()
Terminatorget_terminator()
Statusreplay_completion(Resource resource)

Field Detail

_parents

protected final TransIdentity[] _parents
The list of parents of this transaction, the immediate parent at index 0 and the top level parent at index n-1. If this transaction is a top level, this variable is null.

_tx

protected final TransactionImpl _tx
The underlying transaction to which this control serves as an interface.

Constructor Detail

ControlImpl

ControlImpl(TransactionImpl tx, PropagationContext pgContext)
Creates a new control for a transaction that has been imported using the specified propagation context. The local transaction has it's own Xid, but no parents. The control has the parent list passed through the propagation.

Parameters: tx The local transaction pgContext The propagation context

ControlImpl

ControlImpl(TransactionImpl tx)
Creates a new control for a local transaction that could be used to propagate the transaction to a different server.

Parameters: tx The local transaction

Method Detail

deactivate

protected void deactivate()
This operation is used to deactivate all CORBA objects. It is used when a transaction is ended ( rolled back or commited ).

getCoordinator

protected Coordinator getCoordinator()

getIdentity

protected TransIdentity getIdentity()

getPropagationContext

protected PropagationContext getPropagationContext()

getTerminator

protected Terminator getTerminator()

getTransaction

TransactionImpl getTransaction()
Return the transaction object which this control interface represents.

get_coordinator

public Coordinator get_coordinator()

get_terminator

public Terminator get_terminator()

replay_completion

public Status replay_completion(Resource resource)
Original code is Copyright (c) 1999-2001, Intalio, Inc. All Rights Reserved. Contributions by MetaBoss team are Copyright (c) 2003-2005, Softaris Pty. Ltd. All Rights Reserved.