SetTimeout (obsolete)

Description

Sets the timeout value for subsequent EAServer transactions. The transaction is rolled back if it does not complete before the timeout expires.

Obsolete function

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

Applies to

CORBACurrent objects

Syntax

CORBACurrent.SetTimeout ( seconds )

Argument

Description

CORBACurrent

Reference to the CORBACurrent service instance

seconds

An unsignedlong that specifies the number of seconds that elapse before a transaction is rolled back


Return value

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:

// Instance variables:
// CORBACurrent corbcurr
boolean lb_timeout
integer li_rc

li_rc = this.GetContextService("CORBACurrent", &
      corbcurr)
IF li_rc <> 1 THEN
      // handle the error
END IF
li_rc = corbcurr.Init( "iiop://server1:9003")
IF li_rc <> 1 THEN
      // handle the error
ELSE      
      lb_timeout = corbcurr.SetTimeout(300)
      li_rc = corbcurr.BeginTransaction()
END IF

See also

BeginTransaction (obsolete)

CommitDocking

GetContextService

GetStatus (obsolete)

GetTransactionName (obsolete)

Init (obsolete)

ResumeTransaction (obsolete)

RollbackOnly (obsolete)

RollbackTransaction (obsolete)

SuspendTransaction (obsolete)