Philip
Philip

Reputation: 61

Use websphere MQ as XA transaction coordinator

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!

Upvotes: 5

Views: 2941

Answers (1)

T.Rob
T.Rob

Reputation: 31832

The Detailed System Requirements page says that this is supported, but with some combinations it is necessary to have installed Fix Pack 7.0.1.2 or 7.0.1.3 to work. Please see the section of the page entitled Resource Manager​s (when MQ is the Transaction Manager)​ for details.

The Fix Packs can be downloaded from here.
The documentation to enable XA is here.

Upvotes: 3

Related Questions