Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   Database Access > Working with XA-Compliant External Data Sources > Creating User-Defined XA-Support Routines > 3 3 3

The xa_close( ) function

3

When the 3database is closed or the session ends, whichever occurs first, 3Dynamic Server calls the xa_close( ) function 3for each XA data source used in the database session. This occurs 3when a new local database is opened, a database is closed, or a client 3session ends.

3

The xa_close( ) function is also called 3when the XA data source is created and registered in a transaction 3and the transaction is rolled back.

3

When a database session is closed, all of the XA resources are 3freed and Dynamic server calls xa_close( ) for 3any registered XA datasources in the database session.

3

The syntax for the function is: 3

3
mint xa_close(char *xa_info, /* IN */
3           mint rmid,     /* IN */
3           int4 flags)   /* IN */
3

3 33333333333333333333333
Table 74. xa_close( ) Parameters
Parameter Description
xa_info Information string ("session-id:databasename@servername")
rmid Unique resource manager identifier
flags TMNOFLAGS, the valid value
3

The following code fragment contains the xa_close( ) function: 3

3
#include "xa.h"
3mint mqseries_close(char *xa_info, 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.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]