![]() |
![]() |
|
|
TPBEGIN(3cbl)
Name
TPBEGIN() - routine to begin a BEA Tuxedo ATMI transaction
Synopsis
01 TPTRXDEF-REC.
COPY TPTRXDEF.
01 TPSTATUS-REC.
COPY TPSTATUS.
CALL "TPBEGIN" USING TPTRXDEF-REC TPSTATUS-REC.
Description
A transaction in the BEA Tuxedo system is used to define a single logical unit of work that either wholly succeeds or has no effect whatsoever. A transaction allows work being performed in many processes, at possibly different sites, to be treated as an atomic unit of work. The initiator of a transaction uses TPBEGIN() and either TPCOMMIT() or TPABORT() to delineate the operations within a transaction. Once TPBEGIN() is called, communication with any other program can place the latter (of necessity, a server) in "transaction mode" (that is, the server's work becomes part of the transaction). Threads of control that join a transaction are called participants. A transaction always has one initiator and can have several participants. Only the initiator of a transaction can call TPCOMMIT() or TPABORT(). Participants can influence the outcome of a transaction by the settings in TPSVCDEF-REC they use when they call TPRETURN(). Once in transaction mode, any service requests made to servers are processed on behalf of the transaction (unless the requester explicitly specifies otherwise).
Note that if a program starts a transaction while it has any open connections that it initiated to conversational servers, these connections will not be upgraded to transaction mode. It is as if the TPNOTRAN setting had been specified on the TPCONNECT() call.
T-OUT specifies that the transaction should be allowed at least T-OUT seconds before timing out. Once a transaction times out it must be aborted. If T-OUT is 0, then the transaction is given the maximum number of seconds allowed by the system before timing out (that is, the timeout value equals the maximum value for an unsigned long as defined by the system).
Return Values
Upon successful completion, TPBEGIN() sets TP-STATUS to [TPOK].
Errors
Under the following conditions, TPBEGIN() fails and sets TP-STATUS to:
Notices
When using TPBEGIN(), TPCOMMIT() and TPABORT() to delineate a BEA Tuxedo ATMI transaction, it is important to remember that only the work done by a resource manager that meets the XA0 interface (and is linked to the caller appropriately) has transactional properties. All other operations performed in a transaction are not affected by either TPCOMMIT() or TPABORT(). See buildserver(1) for details on linking resource managers that meet the XA interface into a server such that operations performed by that resource manager are part of a BEA Tuxedo ATMI transaction.
See Also
TPABORT(3cbl), TPCOMMIT(3cbl), TPGETLEV(3cbl), TPSCMT(3cbl)
![]() |
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|