Overview | Determines the status of the current transaction. |
Original interface | CosTransactions::Current Interface |
Intended Usage
If there is no transaction associated with the current thread, the StatusNoTransaction value is returned.
The effect of this request is equivalent to performing the get_status Operation in the corresponding Coordinator Interface.
Syntax
Status get_status();
Input parameters
None.
Return values
Examples
The following examples demonstrate the usage of CosTransactions::Current::get_status.
C++ Example
#include <CosTransactions.hh> { CosTransactions::Current_ptr my_current; CosTransactions::Status_ptr status; ... // Access the CosTransactions::Current object. CORBA::Object_ptr orbCurrentPtr = CBSeriesGlobal::orb()->resolve_initial_references("TransactionCurrent"); my_current = CosTransactions::Current::_narrow(orbCurrentPtr); status = my_current->get_status(); ... }