User Tools

Site Tools


Sidebar

Table Of Contents

endurox:v7.0.x:api:xatmi:tpsuspend.3

TPSUSPEND

TPSUSPEND

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
EXAMPLE
BUGS
SEE ALSO
COPYING

NAME

tpsuspend − Suspend global transaction, and disassociate current thread from XA transaction

SYNOPSIS

#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

DESCRIPTION

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.

RETURN VALUE

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

EXAMPLE

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

BUGS

Report bugs to support@mavimax.com

SEE ALSO

tpcommit(3) tpopen(3) tpclose(3) tpresume(3)

COPYING

© Mavimax, Ltd