tpabort − Abort the global transaction in progress
#include <atmi.h>
int tpabort (long flags);
For XATMI client link with −latmiclt −latmi −lubf −lnstd −lpthread −lrt −lm
For XATMI server link with −latmisrv|−latmisrvnomain|−latmisrvinteg −latmi −lubf −lnstd −lpthread −lrt −lm
Abort the global transaction. This will make any resources touched during the transaction to roll back. Enduro/X will make all resource managers to rollback the changes. Abort of transaction can only be done by transaction initiator, who originally did tpbegin(). flags is reserved for future use and must be 0.
On success, tpabort() return zero; on error, −1 is returned, with tperrno set to indicate the error.
Note that tpstrerror() returns generic error message plus custom message with debug info from last function call.
TPEINVAL flags was not 0.
TPETIME Transaction manager (tmsrv(8)) did not respond in configured time−out time. The state of transaction is unknown.
TPEHAZARD The state of transaction is not fully know. It can be that it is partially committed and partially aborted.
TPEHEURISTIC The state of transaction is not full known. The transaction heuristically completed.
TPESVCERR Failed to call transaction manager, with service error. The state of transaction is unknown.
TPEPROTO XA subsystem was not initialized (did not call tpopen()), no global transaction started or caller is not initiator of transaction.
TPESYSTEM System failure occurred during serving. See logs i.e. user log, or debugs for more info.
TPEOS System failure occurred during serving. See logs i.e. user log, or debugs for more info.
See atmitest/test021_xafull/atmiclt21.c for sample code.
Report bugs to support@mavimax.com
tpbegin(3) tpcommit(3) tpopen(3)
© Mavimax, Ltd