tpsuspend − Suspend global transaction, and disassociate current thread from XA transaction
#include <atmi.h>
int tpsuspend (TPTRANID *tranid, 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
Disassociate XA transaction from current thread and store transaction details to tranid variable. The transaction can be resumed as by doing tpresume(). tranid must not be NULL. flags are reserved for future use, and currently must be set to 0. It is error to have any open call descriptors (either by tpacall() or by tpconnect()). Suspending can be done by any involved process in transaction. But the role of participant does not change. The TPTRANID type records the information about caller, is it transaction originator or not.
On success, tpsuspend() 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. Or tranid was NULL.
TPEPROTO XA subsystem was not initialized (did not call tpopen()), global transaction was not already started, or there was open call descriptors.
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−cli.c for sample code.
Report bugs to support@mavimax.com
tpcommit(3) tpopen(3) tpclose(3) tpresume(3)
© Mavimax, Ltd