Back to home page

Enduro/X

 
 

    


0001 TPABORT(3)
0002 =========
0003 :doctype: manpage
0004 
0005 
0006 NAME
0007 ----
0008 tpabort - Abort the global transaction in progress
0009 
0010 
0011 SYNOPSIS
0012 --------
0013 #include <atmi.h>
0014 
0015 int tpabort (long 'flags');
0016 
0017 For XATMI client link with '-latmiclt -latmi -lubf -lnstd -lpthread -lrt -lm'
0018 
0019 For XATMI server link with '-latmisrv|-latmisrvnomain|-latmisrvinteg -latmi -lubf -lnstd -lpthread -lrt -lm'
0020 
0021 DESCRIPTION
0022 -----------
0023 Abort the global transaction. This will make any resources touched during the 
0024 transaction to roll back. Enduro/X will make all resource managers to rollback 
0025 the changes. Abort of transaction can only be done by transaction initiator, 
0026 who originally did *tpbegin()*. 'flags' is reserved for future use and must be 0.
0027 
0028 tpabort() is allowed for autotran started transactions for configured service 
0029 or in service to which autotran stared transaction call was forwarded. 
0030 After executing abort server process normally will leave a transaction.
0031 
0032 In case if process is joined to the transaction (i.e. it is not an initiator
0033 of the transaction) and tpabort() is called, the error *TPEPROTO* is returned,
0034 process keeps participation in the transaction.
0035 
0036 After the call process leaves the global transaction if one is in the progress,
0037 except if noted otherwise in the error description.
0038 
0039 RETURN VALUE
0040 ------------
0041 On success, *tpabort()* return zero; on error, -1 is returned, 
0042 with *tperrno* set to indicate the error.
0043 
0044 
0045 ERRORS
0046 ------
0047 Note that *tpstrerror()* returns generic error message plus custom message 
0048 with debug info from last function call.
0049 
0050 *TPEINVAL* flags was not 0.
0051 The caller's state with respect to the transaction is not changed.
0052 
0053 *TPETIME* Transaction manager (*tmsrv(8)*) did not respond in configured 
0054 time-out time. The state of transaction is unknown.
0055 
0056 *TPEHAZARD* The state of transaction is not fully know. It can be that it is 
0057 partially committed and partially aborted.
0058 
0059 *TPEHEURISTIC* The state of transaction is not full known. The transaction 
0060 heuristically completed.
0061 
0062 *TPESVCERR* Failed to call transaction manager, with service error. The state 
0063 of transaction is unknown.
0064 
0065 *TPEPROTO* XA subsystem was not initialized (did not call *tpopen()*), no global 
0066 transaction started or caller is not initiator of transaction.
0067 The caller's state with respect to the transaction is not changed.
0068 
0069 *TPESYSTEM* System failure occurred during serving. See logs i.e. user log, 
0070 or debugs for more info.
0071 
0072 *TPEOS* System failure occurred during serving. See logs i.e. user log, 
0073 or debugs for more info.
0074 
0075 EXAMPLE
0076 -------
0077 See *atmitest/test021_xafull/atmiclt21.c* for sample code.
0078 
0079 BUGS
0080 ----
0081 Report bugs to support@mavimax.com
0082 
0083 SEE ALSO
0084 --------
0085 *tpbegin(3)* *tpcommit(3)* *tpopen(3)*
0086 
0087 COPYING
0088 -------
0089 (C) Mavimax, Ltd
0090