Informix transaction support for XA-compliant, external data sources

The HCL Informix® Transaction Manager, which is an integral part of Informix, not a separate module, recognizes XA-compliant, external data sources. These data sources can participate in two-phase commit transactions.

The transaction manager runs support routines for each XA-compliant, external data source that participates in a distributed transaction at a particular transactional event, such as prepare, commit, or rollback. This interaction conforms to X/Open XA interface standards.

Transaction support for XA-compliant, external data sources, which are also called resource managers, enables you to:
  • Create XA-compliant, external data source types and instances of XA-compliant, external data sources.
  • Create or modify a user-defined routine (UDR), virtual table interface, or virtual index interface to enable XA-compliant data sources to provide data access mechanisms for external data from XA-compliant data sources.

    The MQ extension is an example of a set of UDRs that provide this type of external data access.

  • Register XA-compliant, external data sources with Informix.
  • Unregister XA-compliant, external data sources.
  • Use multiple XA-compliant, external data sources within the same global transaction.

The transaction coordination with an XA-compliant, external data source is supported only in HCL Informix logged databases and ANSI-compliant databases, since these databases support transactions. Transaction coordination with an XA-compliant, external data source is not supported in non-logged databases.

You can use the following DDL statements, which are extensions to SQL statements to manage XA data source types and data sources:
Statement Description
CREATE XADATASOURCE TYPE Creates a type of XA-compliant, external data source
CREATE XADATASOURCE Creates an instance of an XA-compliant, external data source
DROP XADATASOURCE Deletes an instance of an XA-compliant, external data source
DROP XADATASOURCE TYPE Deletes a type of XA-compliant, external data source

For more information about these statements, see the IBM® Informix Guide to SQL: Syntax.

The interaction between HCL Informix and an XA-compliant, external data source occurs through a set of user-defined XA-support routines, such as xa_open, xa_end, xa_commit, and xa_prepare. You create these support routines before using the CREATE XADATASOURCE TYPE statement. For more information, see the IBM Informix DataBlade API Programmer's Guide.

After you create an external XA-compliant data source, you can register the data source to a current transaction and you can unregister the data source using the mi_xa_register_xadatasource() or ax_reg() and mi_xa_unregister_xadatasource() or ax_unreg() functions. In a distributed environment, you must register a data source at the local, coordinator server. Registration is transient, lasting only for the duration of the transaction. For more information about using these functions, see the IBM Informix DataBlade API Function Reference and the IBM Informix DataBlade API Programmer's Guide.

Use the following onstat options to display information about transactions involving XA-compliant data sources:
The onstat option What XA-compliant data source information this command displays
onstat -x Displays information about XA participants in a transaction.
onstat -G Displays information about XA participants in a global transaction.
onstat -g ses session id Displays session information, including information about XA data sources participating in a transaction.

The HCL Informix MQ extension provides external data access mechanisms for XA data sources.


Copyright© 2018 HCL Technologies Limited