I am trying to get XA transactions work using unixODBC driver for DB2 database and WMQ Manager using C++. Default Auto Commit has been turned off
Following are the configurations:
UnixODBC => odbc.ini
Driver = DB2_DRIVER
Database = DBNAME
uid = username
pwd = password
WMQ => qm.ini
XAResourceManager:
Name=xa_name
SwitchFile=db2swit
XAOpenString=DBNAME,username,password,toc=p,hold_cursor=t
ThreadOfControl=PROCESS
Following are the steps that I follow in my program
1. Start transaction using MQBEGIN
2. Database connectivity
3. MQGET
4. Insert in DB
5. Disconnect DB
6. End transaction with MQCMIT
After doing the mentioned steps message gets removed from MQ queue but not committed in database. Can anyone please tell me if I am missing some configuration here.
Versions of softwares used
unixODBC => 2.3.2
Websphere MQ => 7.1.0.0
DB2 client => 9.7 fix pack 4
Thanks in advance