ResumeTransaction PowerScript function
Description
Associates the EAServer transaction
passed as an argument with the calling thread.
Controls
CORBACurrent objects
Syntax
1 |
<span>CORBACurrent</span>.<span>ResumeTransaction</span> ( <span>handletrans</span><span> </span>) |
Argument |
Description |
---|---|
CORBACurrent |
Reference to the CORBACurrent service |
handletrans |
An unsignedlong containing the handle |
Return Values
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.

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:
1 |
// Instance variable:<br>// CORBACurrent corbcurr<br>integer li_rc<br>unsignedlong ll_handle<br> <br>li_rc = this.GetContextService("CORBACurrent", &<br> corbcurr)<br>li_rc = corbcurr.Init()<br>li_rc = corbcurr.BeginTransaction()<br>// do some transactional work<br>ll_handle = corbcurr.SuspendTransaction()<br>//do some non-transactional work<br>li_rc = corbcurr.<span>ResumeTransaction</span>(ll_handle)<br>// do some more transactional work<br>li_rc = corbcurr.CommitTransaction() |