SetTimeout PowerScript function
Description
Sets the timeout value for subsequent EAServer transactions. The transaction is
rolled back if it does not complete before the timeout expires.
Controls
CORBACurrent objects
Syntax
1 |
<span>CORBACurrent</span>.<span>SetTimeout</span> ( <span>seconds</span><span> </span>) |
Argument |
Description |
---|---|
CORBACurrent |
Reference to the CORBACurrent service |
seconds |
An unsignedlong that specifies the number |
Return Values
Boolean. Returns true if
it succeeds and false if an error occurs.
Usage
The SetTimeout function specifies the
number of seconds that can elapse before a transaction is rolled
back. The timeout period applies to transactions created by subsequent
invocations of BeginTransaction. If seconds is
0, no timeout period is in effect.
SetTimeout 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
This example shows how to set the timeout period
to five minutes:
1 |
// Instance variables:<br>// CORBACurrent corbcurr<br>boolean lb_timeout<br>integer li_rc<br> <br>li_rc = this.GetContextService("CORBACurrent", &<br> corbcurr)<br>IF li_rc <> 1 THEN<br> // handle the error<br>END IF<br>li_rc = corbcurr.Init( "iiop://server1:9003")<br>IF li_rc <> 1 THEN<br> // handle the error<br>ELSE <br> lb_timeout = corbcurr.<span>SetTimeout</span>(300)<br> li_rc = corbcurr.BeginTransaction()<br>END IF |
See Also
-
BeginTransaction, CommitTransaction, GetContextService, GetStatus, GetTransactionName, Init, ResumeTransaction, RollbackOnly, RollbackTransaction, SuspendTransaction