tpclose — Close XA sub-system, disconnect from XA resource manager
#include <atmi.h>
int tpclose (void);
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
Close connection to XA resource manager. This basically calls underlaying XA switches xa_close_entry() with NDRX_XA_CLOSE_STR.
If tpclose() was already call and XA is closed, then function will succeed, and no error will be generated.
On success, tpclose() 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.
TPEPROTO Control thread is in global transaction.
TPERMERR Resource Manager failed. The tpstrerror() will provide more info from last call.
TPESYSTEM System failure occurred during serving. See logs i.e. user log, or debugs for more info. This could also be a problem with dynamical driver loading.
TPEOS System failure occurred during serving. See logs i.e. user log, or debugs for more info.