Skip navigation.

ATMI C Function Reference

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents View as PDF   Get Adobe Reader

 


tpgetlev(3c)

Name

tpgetlev()—Routine for checking if a transaction is in progress.

Synopsis

#include <atmi.h> 
int tpgetlev()

Description

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().

Return Values

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.

Errors

Upon failure, tpgetlev() sets tperrno to one of the following values:

[TPEPROTO]

tpgetlev() was called improperly.

[TPESYSTEM]

A BEA Tuxedo system error has occurred. The exact nature of the error is written to a log file.

[TPEOS]

An operating system error has occurred.

Notices

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.

See Also

tpabort(3c), tpbegin(3c), tpcommit(3c), tpscmt(3c)

 

Skip navigation bar  Back to Top Previous Next