Use websphere MQ as an 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 this a good practice?

I installed the MQ V7.0.1 server on my windows (64-bit win7) and correctly configured the XA resource manager. However, when my simple Java code starts a transaction and obscures it, only the message in the queue can roll back, but the DB operation cannot roll back. I expect both of them to roll back together.

My simple Java code as shown below QueueManager qmgr = new QueueManager (QM_NAME, properties);
.....
JdbcConnection conn = qmgr.getJdbcConnection (xads);
qmgr.begin ();
// perform the DB operation and send the message to the queue
qmgr.backout ();
conn.Close ();

However, only a "put message" can rollback, while a DB operation cannot.

I'm new to MQ, do you have an idea to solve this problem? Any input is very valuable!

+5
source share
1 answer

, , Fix Pack 7.0.1.2 7.0.1.3 . . " " ( MQ ).

Fix Pack .
XA .

+3

All Articles