org.omg.CosTransactions
Class _SubtransactionAwareResourceStub

java.lang.Object
  |
  +--org.omg.CORBA.portable.ObjectImpl
        |
        +--org.omg.CosTransactions._SubtransactionAwareResourceStub
All Implemented Interfaces:
org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.Object, Resource, ResourceOperations, java.io.Serializable, SubtransactionAwareResource, SubtransactionAwareResourceOperations

public class _SubtransactionAwareResourceStub
extends org.omg.CORBA.portable.ObjectImpl
implements SubtransactionAwareResource

Recoverable objects that implement nested transaction behavior may support a specialization of the Resource interface called the SubtransactionAwareResource interface. A recoverable object can be notified of the completion of a subtransaction by registering a specialized resource object that offers the SubtransactionAwareResource interface with the Transaction Service. This registration is done by using the register_resource or the register_subtran_aware operation of the current Coordinator object. A recoverable object generally uses the register_resource operation to register a resource that will participate in the completion of the top-level transaction and the register_subtran_aware operation to be notified of the completion of a subtransaction. Certain recoverable objects may want a finer control over the registration in the completion of a subtransaction. These recoverable objects will use the register_resource operation to ensure participation in the completion of the top-level transaction and they will use the register_subtran_aware operation to be notified of the completion of a particular subtransaction. For example, a recoverable object can use the register_subtran_aware operation to establish a "committed with respect to" relationship between transactions; that is, the recoverable object wants to be informed when a particular subtransaction is committed and then perform certain operations on the transactions that depend on that transaction’s completion. This technique could be used to implement lock inheritance, for example. The Transaction Service uses the SubtransactionAwareResource interface on each Resource object registered with a subtransaction. Each object supporting this interface is implicitly associated with a single subtransaction.

See Also:
Serialized Form

Constructor Summary
_SubtransactionAwareResourceStub()
           
 
Method Summary
 java.lang.String[] _ids()
           
 void commit_one_phase()
          Operation commit_one_phase
 void commit_subtransaction(Coordinator parent)
          Operation commit_subtransaction
 void commit()
          Operation commit
 void forget()
          Operation forget
 Vote prepare()
          Operation prepare
 void rollback_subtransaction()
          Operation rollback_subtransaction
 void rollback()
          Operation rollback
 
Methods inherited from class org.omg.CORBA.portable.ObjectImpl
_create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
 

Constructor Detail

_SubtransactionAwareResourceStub

public _SubtransactionAwareResourceStub()
Method Detail

_ids

public java.lang.String[] _ids()
Overrides:
_ids in class org.omg.CORBA.portable.ObjectImpl

commit_subtransaction

public void commit_subtransaction(Coordinator parent)
Operation commit_subtransaction
Specified by:
commit_subtransaction in interface SubtransactionAwareResourceOperations

rollback_subtransaction

public void rollback_subtransaction()
Operation rollback_subtransaction
Specified by:
rollback_subtransaction in interface SubtransactionAwareResourceOperations

prepare

public Vote prepare()
             throws HeuristicMixed,
                    HeuristicHazard
Operation prepare
Specified by:
prepare in interface ResourceOperations

rollback

public void rollback()
              throws HeuristicCommit,
                     HeuristicMixed,
                     HeuristicHazard
Operation rollback
Specified by:
rollback in interface ResourceOperations

commit

public void commit()
            throws NotPrepared,
                   HeuristicRollback,
                   HeuristicMixed,
                   HeuristicHazard
Operation commit
Specified by:
commit in interface ResourceOperations

commit_one_phase

public void commit_one_phase()
                      throws HeuristicHazard
Operation commit_one_phase
Specified by:
commit_one_phase in interface ResourceOperations

forget

public void forget()
Operation forget
Specified by:
forget in interface ResourceOperations