5

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!

Philip
  • 61
  • 1
  • 4

1 Answers1

3

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.

T.Rob
  • 31,522
  • 9
  • 59
  • 103
  • Thanks Rob. However even use MQ V7.1, the problem is still there. And I was also following the instruction from IBM information center. Everything looks good because there is not any error log output, but the XA transaction doesn't work. – Philip May 03 '12 at 12:39
  • Sounds like it is time to open a PMR. If the XA is configured as specified in the Infocenter and the other prereqs are met as per the System Requirements page, then best bet is to let the IBM Support folks walk through the configuration in detail to reconcile against the required configs. – T.Rob May 03 '12 at 22:52
  • Yes, I think I have to turn to IBM for help. – Philip May 04 '12 at 06:15