Configuring Informix IDS for XA

22 Jul 2015 - 07:17 | Version 8 | | , ,

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

Contact Us

Atomikos Corporate Headquarters
Hoveniersstraat, 39/1, 2800
Mechelen, Belgium

E info@atomikos.com
E sales@atomikos.com
T +3215613055

Subscribe to our newsletter

Never miss an update

Copyright 2016 Atomikos BVBA