SuspendTransaction (obsolete)

Description

Suspends the EAServer transaction associated with the calling thread.

Obsolete function

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

Applies to

CORBACurrent objects

Syntax

CORBACurrent.SuspendTransaction (  )

Argument

Description

CORBACurrent

Reference to the CORBACurrent service instance


Return value

Unsigned long.

Returns a handle that refers to the transaction associated with the thread or 0 if an error occurs.

Usage

The SuspendTransaction function returns a handle referring to the transaction associated with the calling thread. This handle can be passed to the ResumeTransaction function on the same or a different thread. When SuspendTransaction is called, the current thread is no longer associated with a transaction.

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

Examples

This example shows the use of the SuspendTransaction function to disassociate the calling thread from the current transaction:

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

// Get and initialize an instance of CORBACurrent
...
li_rc = corbcurr.BeginTransaction()
// do some transactional work
ll_handle = corbcurr.SuspendTransaction()
// do some nontransactional work
li_rc = corbcurr.ResumeTransaction(ll_handle)
// do some more transactional work
li_rc = corbcurr.CommitTransaction()

See also

BeginTransaction (obsolete)

CommitDocking

GetTransactionName (obsolete)

ResumeTransaction (obsolete)

RollbackTransaction (obsolete)

SetTimeout (obsolete)