ResumeTransaction (obsolete)

Description

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

Obsolete function

ResumeTransaction is obsolete, because EAServer is no longer supported since PowerBuilder 2017.

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


Return value

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

-1 -- Unknown failure

-2 -- The transaction referred to by handletrans is no longer valid

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.

Caution

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

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

BeginTransaction (obsolete)

CommitDocking

GetContextService

GetStatus (obsolete)

GetTransactionName (obsolete)

Init (obsolete)

RollbackOnly (obsolete)

RollbackTransaction (obsolete)

SetTimeout (obsolete)

SuspendTransaction (obsolete)