Current::get_control

Overview Returns an object representing the transaction context currently associated with the current thread.
Original interface CosTransactions::Current Interface


Intended Usage

If the current thread is not associated with a transaction, a NULL object reference is returned.

The Control object returned can be given to the Current::resume Operation to reestablish this transaction context in the same thread or a different thread.

Syntax

  Control get_control();

Input parameters

None.

Return values

Control
Represents the transaction context currently associated with the current thread. The caller should not free the returned object; the Transaction Service retains ownership of it.

Examples

The following examples demonstrate the usage of CosTransactions::Current::get_control.

C++ Example

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

Related reference
CosTransactions in the transaction service



Searchable topic ID:   rcor_ctscu3
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_ctscu3.html

Library | Support | Terms of Use | Feedback