Back to home page

Enduro/X

 
 

    


0001 TX_SET_COMMIT_RETURN(3)
0002 =======================
0003 :doctype: manpage
0004 
0005 
0006 NAME
0007 ----
0008 tx_set_commit_return - Set commit return mode for TX API
0009 
0010 
0011 SYNOPSIS
0012 --------
0013 #include <tx.h>
0014 
0015 int tx_set_commit_return(COMMIT_RETURN when_return);
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 Change the logic how *tx_commit(3)* shall behave. Setting affects current
0024 transaction and is used during the phase when commit is performed. The setting
0025 value is stored in thread local stored for particular control thread.
0026 
0027 Parameter 'when_return' accepts following values:
0028 
0029 - *TX_COMMIT_DECISION_LOGGED* which indicates that *tx_commit(3)* will return
0030 immediately after all transaction managers participating in transaction have
0031 been prepared for commit. And the actual commit is left for background thread
0032 at transaction manager *tmsrv(8)* server process. The *tmsrv(8)* run these
0033 jobs periodically at *-s* seconds interval, configured at server's command line
0034 parameter.
0035 
0036 - *TX_COMMIT_COMPLETED* the default value which means that *tx_commit(3)* will
0037 return only after full commit have been performed.
0038 
0039 
0040 RETURN VALUE
0041 ------------
0042 On success, *tx_set_commit_return()* return *TX_OK*; on error, error code is returned
0043 
0044 ERRORS
0045 ------
0046 
0047 *TX_EINVAL* The value of 'when_return' is not *TX_COMMIT_DECISION_LOGGED* nor
0048 *TX_COMMIT_COMPLETED*.
0049 
0050 *TX_PROTOCOL_ERROR* Transaction manager is not open by *tx_open(3)*
0051 
0052 EXAMPLE
0053 -------
0054 See *atmitest/test021_xafull/atmiclt21tx.c* for sample code.
0055 
0056 BUGS
0057 ----
0058 Report bugs to support@mavimax.com
0059 
0060 SEE ALSO
0061 --------
0062 *tx_open(3)* *tx_close(3)* *tx_begin(3)* *tx_commit(3)* *tx_rollback(3)* *tx_info(3)*
0063 *tx_set_transaction_timeout(3)* *tx_set_transaction_control(3)*
0064 
0065 COPYING
0066 -------
0067 (C) Mavimax, Ltd
0068