GetTransactionName

Description

Returns a string describing the EAServer transaction associated with the calling thread.

Applies to

CORBACurrent objects

Syntax

CORBACurrent.GetTransactionName (  )

Argument

Description

CORBACurrent

Reference to the CORBACurrent service instance

Returns

String. Returns a printable string describing the transaction if a transaction exists and an empty string otherwise.

Usage

The GetTransactionName function returns a string identifying the transaction associated with the calling thread. This string is typically used for debugging.

GetTransactionName can be called by a client or a component that is marked as OTS style. EAServer must be using the two-phase commit transaction coordinator (OTS/XA).

Examples

Example 1

This example shows the use of GetTransactionName to return information about a transaction to a client:

// Instance variables:
// CORBACurrent corbcurr
string ls_transacname

// Get an instance of the CORBACurrent object
// and initialize it   
...
ls_transacname = corbcurr.GetTransactionName()
   MessageBox("Transaction Name", ls_transacname)

See also