User Tools

Site Tools


Sidebar

Table Of Contents

endurox:v7.5.x:api:xatmi:tpclose.3

tpclose

Name

tpclose — Close XA sub-system, disconnect from XA resource manager

Synopsis

#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

DESCRIPTION

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.

RETURN VALUE

On success, tpclose() return zero; on error, -1 is returned, with tperrno set to indicate the error.

ERRORS

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.

EXAMPLE

See atmitest/test021_xafull/atmiclt21.c for sample code.

BUGS

Report bugs to support@mavimax.com

COPYING

© Mavimax, Ltd