ResumeTransaction

Description

Associates the EAServer transaction passed as an argument with the calling thread.

Applies to

CORBACurrent objects

Syntax

CORBACurrent.ResumeTransaction ( handletrans )

Argument

Description

CORBACurrent

Reference to the CORBACurrent service instance

handletrans

An unsignedlong containing the handle of a suspended transaction

Returns

Integer. Returns 0 if it succeeds and one of the following negative values if an error occurs:

Usage

The ResumeTransaction function associates the transaction referred to by the handletrans argument with the calling thread. The argument is obtained from a call to SuspendTransaction and may refer to a transaction that was previously associated with the current thread or with a different thread in the same execution environment.

NoteCaution The handletrans argument must be obtained from the SuspendTransaction function. Using any other value as the argument to ResumeTransaction may have unpredictable results.

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

Examples

Example 1

This example shows the use of the ResumeTransaction function to associate the calling thread with the transaction referred to by the ll_handle argument returned by SuspendTransaction:

// Instance variable:
// CORBACurrent corbcurr
integer li_rc
unsignedlong ll_handle

li_rc = this.GetContextService("CORBACurrent", &
    corbcurr)
li_rc = corbcurr.Init()
li_rc = corbcurr.BeginTransaction()
// do some transactional work
ll_handle = corbcurr.SuspendTransaction()
//do some non-transactional work
li_rc = corbcurr.ResumeTransaction(ll_handle)
// do some more transactional work
li_rc = corbcurr.CommitTransaction()

See also