I am trying to use Websphere MQ (without WAS) as the XA transaction coordinator for my java application between MQ and Oracle 11g.
Is it possible? Is it a good practice?
I have installed the MQ V7.0.1 server on my windows (64bit win7) and config the XA resource manager properly. However when my simple java code start a transaction and blackout it, only the message on the queue can rollback but DB operation can not rollback. I expect both of them can rollback together.
My simple java code like below
QueueManager qmgr = new QueueManager(QM_NAME, properties);
.....
JdbcConnection conn = qmgr.getJdbcConnection(xads);
qmgr.begin();
// do DB operation and put message to queue
qmgr.backout();
conn.close();
However only the 'put message' can rollback, while the DB operation can not.
I am a newbie for MQ, Do you have any idea to resolve this issue? Any input is highly appreciate!