Edit | Attach | New | Raw | Delete | History | Print | Tools

Configuring Informix IDS for XA

AtomikosDataSourceBean example

AtomikosDataSourceBean ds = new AtomikosDataSourceBean();
ds.setUniqueResourceName("informix");
ds.setXaDataSourceClassName("com.informix.jdbcx.IfxXADataSource");
Properties p = new Properties();
p.setProperty ( "user" , "informix" );
p.setProperty ( "password" , "informix" );
p.setProperty ( "serverName" , "ifxtest" );
p.setProperty ( "databaseName" , "java" );
p.setProperty ( "portNumber" , "1526" );
p.setProperty ( "ifxIFXHOST" , "localhost-ifx" );
p.setProperty ( "ifxIFX_LOCK_MODE_WAIT" , "5" );
p.setProperty ( "ifxIFX_XASPEC" , "Y" );
ds.setXaProperties ( p );

Notes

Informix versions 10.00.TC3TL and 10.00.TC5I1 are known to be working both with driver version 3.00.JC3.

The database is ready for XA out of the box. There is no need to configure anything special but you have to use create database with log for database creation or the XADataSource will refuse to connect.

All tables must be configured with row-level locking and you have to update the statistics in the system catalogs that the optimizer uses to determine the lowest-cost query plan. This basically means executing these commands:

ALTER TABLE <table 1> LOCK MODE (ROW);
ALTER TABLE <table 2> LOCK MODE (ROW);
ALTER TABLE <table 3> LOCK MODE (ROW);
...
UPDATE STATISTICS HIGH;

IBM created an good article explaining how to get the most out of Informix and XA: http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0602sudhakar/index.html spacer

Copyright © 2014 Atomikos BVBA. Transaction Management for Extreme Transaction Processing and SOA Environments serving ISV, Commercial, OEM and Open Source Markets
Site map RSS ATOM