Register and unregister XA-compliant data sources

After you create an external XA-compliant data source, transactions can register data source using the mi_xa_register_xadatasource() or ax_reg() functions. You can also unregister the data source using the mi_xa_unregister_xadatasource() or ax_unreg() functions.

The mi_xa_register_xadatasource() function and the ax_reg() function both register XA-compliant, external data sources. However, these functions use different parameters and have different return values.

Similarly, the mi_xa_unregister_xadatasource() and ax_unreg() functions perform the same operation, but use different parameters and have different return values.

Unlike SQL CREATE operations, which create entries in system catalog tables, registration is transient, lasting only for the duration of the transaction. A transaction must be started, implicitly or explicitly, before the application can register the XA data source.

In a distributed environment, you must register a data source using the local coordinator server.

Multiple registrations of the same XA data source in a transaction have the same effect as a single registration. HCL Informix® does not maintain a count of the number of times an application has registered. A single call to ax_unreg() or mi_xa_unregister_xadatasource() unregisters the data source from the transaction.