Control::get_terminator

Overview Returns an object that supports the Terminator Interface for the transaction represented by the Control object.
Original interface CosTransactions::Control Interface
Exceptions TRANSACTION_ROLLEDBACK standard exception
Unavailable


Intended Usage

The Terminator object can be used to rollback or commit the transaction associated with the Control. The Unavailable exception is raised if the Control cannot provide the requested object. The TRANSACTION_ROLLEDBACK standard exception is raised if the Control object represents a transaction that has rolled back.

Syntax

  Terminator get_terminator ()
      raises (Unavailable);

Input parameters

None.

Return values

Terminator
An object that supports the Terminator interface for the transaction represented by the Control object. It can be used to commit or roll back the transaction. The caller should not free the returned object; the Transaction Service retains ownership of it.

Examples

The following example demonstrates the usage of CosTransactions::Control::get_terminator.

C++ Example

#include <CosTransactions.hh>
{
   CosTransactions::Current_ptr my_current;
   CosTransactions::Control_ptr control;
   CosTransactions::Terminator_ptr term;
   ...
   // Access the CosTransactions::Current object.
   CORBA::Object_ptr orbCurrentPtr = 
      CBSeriesGlobal::orb()->resolve_initial_references("TransactionCurrent");
   my_current = CosTransactions::Current::_narrow(orbCurrentPtr);
   my_current->begin();
   control = my_current->get_control();
   term = control->get_terminator();
}

Related reference
CosTransactions in the transaction service



Searchable topic ID:   rcor_ctsct2
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/corba/ref/rcor_ctsct2.html

Library | Support | Terms of Use | Feedback