Purpose Options for XA Data Source Types
The CREATE XADATASOURCE TYPE statement specifies purpose functions that provide access to data from external data sources that comply with the X/Open XA standards. These functions also enable external data to be processed in accordance with the transactional semantics of HCL OneDB™. Only databases that use transaction logging, such as ANSI-compliant databases and HCL OneDB databases that support explicit transactions, can support transaction coordination.
CREATE XADATASOURCE TYPE 'informix'.MQSeries( xa_flags = 1, xa_version = 0, xa_open = informix.mqseries_open, xa_close = informix.mqseries_close, xa_start = informix.mqseries_start, xa_end = informix.mqseries_end, xa_rollback = informix.mqseries_rollback, xa_prepare = informix.mqseries_prepare, xa_commit = informix.mqseries_commit, xa_recover = informix.mqseries_recover, xa_forget = informix.mqseries_forget, xa_complete = informix.mqseries_complete);
These values represent the fields in the XA Switch Structure, as listed in the file $INFORMIXDIR/incl/public/xa.h. The order of specifications in this example follows the order of column names in the sysxasourcetypes system catalog table, but they can be listed in any order, provided that no item is repeated. The xa_flags and xa_version values must be numbers; the rest must be names of UDRs that the Transaction Manager can invoke. These UDRs must already exist in the database before you can issue a CREATE XADATASOURCE TYPE statement that references them among its purpose option specifications.
The DROP FUNCTION or DROP ROUTINE statement cannot drop a UDR that is listed among the purpose options of a CREATE XADATASOURCE TYPE statement until all of the XA datasource types that were defined using the UDR are dropped.
For information about how to use the UDRs in the previous example to coordinate transactions with external XA data sources, see the HCL OneDB DataBlade® API Programmer's Guide.
For information about the MQDataBlade module, see the HCL OneDB Database Extensions User's Guide.