The xa_prepare( ) function 3prepares XA data source transaction changes for a commit or rollback 3operation. A successful return from xa_prepare( ) indicates 3that the XA data source will successfully commit or rollback when 3requested.
3The syntax for the function is: 3
3mint xa_prepare (XID *xid, /* IN */ 3 mint rmid, /* IN */ 3 int4 flags) /* IN */3 3
Parameter | 3Description | 3
---|---|
xid | 3Pointer to the XID data structure that is defined 3in the xa.h file and used for the current 3transaction | 3
rmid | 3Unique resource manager identifier | 3
flags | 3TMNOFLAGS, which is the valid value. | 3
The following code fragment contains the xa_prepare( ) function: 3
3#include "xa.h" 3mint mqseries_prepare(XID *xid, mint rmid, int4 flags) 3 { 3/* Error */ 3 return XAER_RMERR; 3/* Success */ 3 return XA_OK; 3}3
For valid return values, refer to X/Open information, including Distributed Transaction Processing: The XA Specification.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]