Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   Other Syntax Segments > Purpose Options > 3 3 3

Purpose Options for XA Data Source Types

3 3

The CREATE XADATASOURCE TYPE statement specifies purpose functions that 3provide access to data from external data sources that comply with the X/Open 3XA standards. These functions also enable external data to be processed in 3accordance with the transactional semantics of Dynamic Server. Only databases 3that use transaction logging, such as ANSI-compliant databases and Dynamic 3Server databases that support explicit transactions, can support transaction 3coordination.

3

The following statement creates a new XA data source type called MQSeries, owned by user informix.

3
CREATE XADATASOURCE TYPE 'informix'.MQSeries(
3                           xa_flags    = 1,
3                           xa_version  = 0,
3                           xa_open     = informix.mqseries_open,
3                           xa_close    = informix.mqseries_close,
3                           xa_start    = informix.mqseries_start,
3                           xa_end      = informix.mqseries_end,
3                           xa_rollback = informix.mqseries_rollback,
3                           xa_prepare  = informix.mqseries_prepare,
3                           xa_commit   = informix.mqseries_commit,
3                           xa_recover  = informix.mqseries_recover,
3                           xa_forget   = informix.mqseries_forget,
3                          xa_complete = informix.mqseries_complete);
3

These values represents the fields in the XA Switch Structure, as listed 3in the file $INFORMIXDIR/incl/public/xa.h. The order 3of specifications in this example follows the order of column names in the sysxasourcetypes system catalog table, but they can be listed 3in any order, provided that no item is repeated. The xa_flags and xa_version values must be numbers; the rest 3must be names of UDRs that the Transaction Manager can invoke. These UDRs 3must already exist in the database before you can issue a CREATE XADATASOURCE 3TYPE statement that references them among its purpose option specifications.

3

The DROP FUNCTION or DROP ROUTINE statement cannot drop a UDR that is listed 3among the purpose options of a CREATE XADATASOURCE TYPE statement until all 3of the XA datasource types that were defined using the UDR are dropped.

3

3For information about how to use the UDRs in the previous 3example to coordinate transactions with external XA data sources, see the IBM Informix DataBlade API Programmer's Guide. 3

3

3For information about the MQDataBlade module, see the IBM Informix Built-In DataBlade Modules User's Guide.3

Related Information

3Related statements: ALTER ACCESS_METHOD , CREATE ACCESS_METHOD, CREATE OPCLASS, 3 and CREATE XADATASOURCE TYPE

For the following topics, see the IBM Informix Virtual-Table Interface Programmer's Guide (for C):

For the following topics, see the IBM Informix Virtual-Index Interface Programmer's Guide (for C):

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