During 1-phase commit, some JMS brokers (ActiveMQ and other?) sometimes fail to recognise the Xid being committed. Instead of raising a needless heuristic (hazard) exception, this is now treated as internal timeout/rollback in the resource, and merely yields a RollbackException instead.
This is important when used with Spring's message listener containers because Spring will attempt to commit if there is no message on the queue, leading to a 1-phase commit where this can happen.
To improve the interpretation of the output of our LogUtil, it helps if extra details are shown - so the toString() method now returns output like this:
XAResourceTransaction: 7075626C697368657230303030313030303031:7075626C69736865723131 [IN_DOUBT in resource amq1]
It is now possible to call Object methods on connections after they were closed.
We now offer the AtomikosApplicationContextAware class in package com.atomikos.spring to automate the init and close ordering of your Atomikos Spring beans. It automates the correct init and shutdown ordering of your Atomikos beans, freeing you from the need to specify explicit and brittle depends-on bean dependencies, as well as init and destroy methods. To use this feature, simply add an instance of com.atomikos.spring.AtomikosApplicationContextAware to your Spring config…
Fixed cleanup of resources when writing a new epoch file, to avoid exceptions under abnormal operating conditions.
If two or more databases are involved, and all DBMS transactions are readonly, then the connections are not returned to the pool because Synchronization callbacks are not done properly. This has been fixed.