ATMI C Function Reference
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
tpgetlev()
—Routine for checking if a transaction is in progress.
#include <atmi.h>
int tpgetlev()
tpgetlev()
returns to the caller the current transaction level. Currently, the only levels defined are 0 and 1.
In a multithreaded application, a thread in the TPINVALIDCONTEXT
state is not allowed to issue a call to tpgetlev()
.
Upon successful completion, tpgetlev()
returns either a 0 to indicate that no transaction is in progress, or 1 to indicate that a transaction is in progress;
Upon failure, tpgetlev()
returns -1 and sets tperrno
to indicate the error condition.
Upon failure, tpgetlev()
sets tperrno
to one of the following values:
When using tpbegin()
, tpcommit()
and tpabort()
to delineate a BEA Tuxedo ATMI system transaction, it is important to remember that only the work done by a resource manager that meets the XA 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 system transaction.
![]() ![]() |
![]() |
![]() |