RollbackOnly (obsolete)

Description

Modifies an EAServer transaction associated with a calling thread so that the only possible outcome is to roll back the transaction.

Obsolete function

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

Applies to

CORBACurrent objects

Syntax

CORBACurrent.RollbackOnly (  )

Argument

Description

CORBACurrent

Reference to the CORBACurrent service instance


Return value

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

-1 -- Failed for unknown reason

-2 -- No transaction is associated with the calling thread

Usage

RollbackTransaction is typically called by the originator of the transaction. Another participant in a client- or OTS style transaction can call RollbackOnly to vote that the transaction should be rolled back.

RollbackOnly 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

In this example, a participant in a transaction has determined that it should be rolled back. It creates and initializes an instance of the CORBACurrent service object and votes to roll back the transaction:

// Instance variable:
// CORBACurrent corbcurr
int li_rc

li_rc = this.GetContextService("CORBACurrent", &
    corbcurr)
IF li_rc <> 1 THEN
// handle the error
END IF

li_rc = corbcurr.Init()
IF li_rc <> 0 THEN
// handle the error
ELSE
    corbcurr.RollbackOnly()
END IF

See also

BeginTransaction (obsolete)

CommitDocking

GetContextService

GetStatus (obsolete)

GetTransactionName (obsolete)

Init (obsolete)

ResumeTransaction (obsolete)

RollbackTransaction (obsolete)

SetTimeout (obsolete)

SuspendTransaction (obsolete)