The xa_open( ) function 3is called once per database session for each XA data source that 3participates in a Dynamic Server transaction. The xa_open( ) function 3is called when a user-defined function registers the XA data source 3with a transaction by calling mi_ register_xadatasource( ) or 3using ax_reg( ) for the first time after the database 3opens.
3Subsequent calls to mi_register_xadatasource( ) or ax_reg( ) in 3the same the same database session do not result in the invocation 3of the xa_open( ) function.
3The syntax for the function is: 3
3mint xa_open(char *xa_info, /* IN */ 3 mint rmid, /* IN */ 3 int4 flags) /* IN */3 3 3
Parameter | 3Description | 3
---|---|
xa_info | 3Information string ("session-id:databasename@servername") | 3
rmid | 3Unique resource manager identifier | 3
flags | 3TMNOFLAGS, the valid value | 3
The following code fragment contains the xa_open( ) function: 3
3#include "xa.h" 3mint mqseries_open(char *xa_info, mint rmid, int4 flags) 3 { 3/* setup the datastructures/etc. */ 3if ( (myloc = mi_dalloc(sizeof(struct my_location), PER_SESSION)) 3 == (char *) NULL) 3 { 3 return XAER_RMERR; 3 } 3.... 3Return 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 ]