tx_rollback — Rollback a global transaction
#include <tx.h>
int tx_rollback(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
Function rolls back global transaction associated with current thread previously started by tx_begin(3). If transaction control was changed by tx_set_transaction_control(3) flag TX_CHAINED, the new transaction is started immediately after the rollback.
Function use following attributes set by:
TX API is base on TP API. This function is based on tpabort(3) and it is possible to mix these two API kinds.
TX_NO_BEGIN The transaction committed successfully; however, a new transaction could not be started and the caller is no longer in transaction mode. This return value occurs only when the transaction_control characteristic is TX_CHAINED.
TX_MIXED The transaction was partially committed and partially rolled back. In addition, if the transaction_control(3) characteristic is TX_CHAINED, a new transaction is started.
TX_MIXED_NO_BEGIN The transaction was partially committed and partially rolled back. In addition, a new transaction could not be started and the caller is no longer in transaction mode. This return value can occur only when the transaction_control(3) characteristic is TX_CHAINED.
TX_HAZARD Due to a failure, the transaction may have been partially committed and partially rolled back. In addition, if the transaction_control(3) characteristic is TX_CHAINED, a new transaction is started.
TX_HAZARD_NO_BEGIN Due to a failure, the transaction may have been partially committed and partially rolled back. In addition, a new transaction could not be started and the caller is no longer in transaction mode. This return value can occur only when the transaction_control(3) characteristic is TX_CHAINED.
TX_PROTOCOL_ERROR The function was called in an improper context (for example, the caller is not in transaction mode). The caller’s state with respect to the transaction is not changed.
TX_FAIL Either the transaction manager or one or more of the resource managers encountered a fatal error. The nature of the error is such that the transaction manager and/or one or more of the resource managers can no longer perform work on behalf of the application. The exact nature of the error is determined in a product-specific manner. The caller’s state with respect to the transaction is unknown.