Overview | Supports debugging by returning a string describing the transaction. |
Original interface | CosTransactions::Current Interface |
Intended Usage
If there is no transaction associated with the current thread, an empty string is returned.
The effect of this request is equivalent to performing the get_transaction_name Operation in the corresponding Coordinator Interface.
Syntax
string get_transaction_name();
Input parameters
None.
Return values
Examples
The following examples demonstrate the usage of CosTransactions::Current::get_transaction_name.
C++ Example
#include <CosTransactions.hh> { CosTransactions::Current_ptr my_current; string name; ... // Access the CosTransactions::Current object. CORBA::Object_ptr orbCurrentPtr = CBSeriesGlobal::orb()->resolve_initial_references("TransactionCurrent"); my_current = CosTransactions::Current::_narrow(orbCurrentPtr); name = my_current->get_transaction_name(); cout << "Current transaction name is " << name << endl; ... }