User Tools

Site Tools


Sidebar

Table Of Contents

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

tpsuspend

Name

tpresume — Resume global transaction

Synopsis

#include <atmi.h>

int tpresume (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

DESCRIPTION

Resume global transaction with given transaction data in tranid parameter. trandid previously must be set by tpsuspend(3) call. To resume global transaction, XA sub-system must be open, by tpopen(3). Technically it is possible that resume is done by other process than which did the suspend.

Valid flags

TPTXNOOPTIM Do not use cached known resource managers in tranid. Thus having this flag set, this process even for previously involved RMs will perform xa transaction start and if that fails, then attempt TM_JOIN.

TPTXTMSUSPEND Indicates that tranid was suspended (tpsuspend(3)) with this flag (i.e. which resulted in TMSUSPEND xa flag). And now transaction would be resumed with TMRESUME xa flag instead of TMJOIN. This applies to XA switches which support join operation and join is not disabled by NOJOIN flag in NDRX_XA_FLAGS.

RETURN VALUE

On success, tpresume() 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.

TPEINVAL Flags was not 0. Or tranid was NULL.

TPEPROTO Global transaction is already started.

TPESYSTEM System failure occurred during serving. See logs i.e. user log, or debugs for more info. Could be the case if XA sub-system is not open by tpopen(). Transaction was expired at tmsrv(8).

TPEOS System failure occurred during serving. See logs i.e. user log, or debugs for more info.

BUGS

Report bugs to support@mavimax.com

COPYING

© Mavimax, Ltd