Posted: Thu Jan 25, 2018 10:02 am Post subject: JBoss and uncommitted transactions not cleared.
Voyager
Joined: 02 Apr 2017 Posts: 77
Hello,
We have a JBoss application running with an MQ8 client that sends a two phase commit to an MQ V8.0.0.7 queue manager running on Linux.
Now for testing sake JBoss is killed and restarted. From time to time we see uncommitted transactions in state (ACTIVE) when checking with dspmqtrn. We also see some in (PREPARED). The PREPARED ones are "recovered" when JBoss restarts but the ACTIVE ones stay uncommitted until the queue manager is restarted.
We also tried to add DISCINT(960) to the SVRCONN channel of JBoss. But the behaviour is the same as when it's set to 0.
Is this a correct behaviour ? or is there anything specific to the connection parameters we might have missed ?
There's a well know issue with the XA spec, where a transaction which is between xa_end and xa_prepare can get 'stuck' if the TM should end when the transaction is in this state.
The typical work-around is for the RM to time out the transactions.
By default MQ won't back out these transactions until it needs to recover the log space, however you can set a couple of environment variables in the environment from which the queue manager is started to change this behaviour.
see https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.5.0/com.ibm.mq.dev.doc/q114450_.htm
Thank you. I was not aware of that and will read up on it.
I'm not 100% clear of the abbreviations. Is TM = Transaction Manager ? and RM = Remote Manager ?
Is this also true for none XA transactions that are 2 phase ? Let's say I have one transaction with an MQGET and MQPUT that are not yet committed and in state ACTIVE ? _________________ You win again gravity !
This 'issue' only exists for externally managed transaction (XA).
A 'simple' single phase MQI transaction doesn't issue xa_end or xa_prepare and is associated with the hConn under which it started for the lifetime of the transaction.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum