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.
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; otherwise, tpgetlev() returns \-1 on error and sets tperrno to indicate the error condition.
Under the following conditions, tpgetlev() fails and sets tperrno to:
TPEPROTO]
TPESYSTEM]
TPEOS]
When using tpbegin(3), tpcommit(3) and tpabort(3) to delineate a BEA TUXEDO 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(3) or tpabort(3). 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 system transaction.
tpabort(3), tpbegin(3), tpcommit(3), tpscmt(3)