org.openorb.ccs.kernel
Class Synchronization

java.lang.Object
  extended by org.omg.PortableServer.Servant
      extended by org.omg.CosTransactions.SynchronizationPOA
          extended by org.openorb.ccs.kernel.Synchronization
All Implemented Interfaces:
org.omg.CORBA.portable.InvokeHandler, org.omg.CosTransactions.SynchronizationOperations, org.omg.CosTransactions.TransactionalObjectOperations

public class Synchronization
extends org.omg.CosTransactions.SynchronizationPOA

This class is a Synchronization implementation of the Transaction Service. It is used to release all locks from transaction which rolledbacked or committed.


Constructor Summary
Synchronization(TransactionalLockSet tls, org.omg.CosTransactions.Coordinator current)
          Constructor.
 
Method Summary
 void after_completion(org.omg.CosTransactions.Status status)
          This operation is invoked after all commit or rollback responses have been received by this coordinator.
 void before_completion()
          This operation is invoked prior to the start of the two-phase commit protocol within the coordinator the Synchronization has registered with.
 
Methods inherited from class org.omg.CosTransactions.SynchronizationPOA
_all_interfaces, _invoke, _this, _this
 
Methods inherited from class org.omg.PortableServer.Servant
_default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Synchronization

public Synchronization(TransactionalLockSet tls,
                       org.omg.CosTransactions.Coordinator current)
Constructor.

Parameters:
tls - The trnascational lock set.
current - The current transaction coordinator.
Method Detail

before_completion

public void before_completion()
This operation is invoked prior to the start of the two-phase commit protocol within the coordinator the Synchronization has registered with. This operation will therefore be invoked prior to prepare being issued to Resource objects or X/Open Resource Managers registered with that same coordinator. The Synchronization object must ensure that any state data it has that needs to be made persistent is made available to the resource. Only standard exceptions may be raised. Unless there is a defined recovery procedure for the exception raised, the transaction should be marked rollback only.


after_completion

public void after_completion(org.omg.CosTransactions.Status status)
This operation is invoked after all commit or rollback responses have been received by this coordinator. The current status of the transaction (as determined by a get_status on the Coordinator) is provided as input. Only standard exceptions may be raised and they have no effect on the outcome of the commitment process.

Parameters:
status - The transaction status.