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
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(); ... }