Last Resource Commit optimization
In theory, only JMS servers supporting XA and providing a
javax.jms.XAConnectionFactory implementation can be used with transaction managers. In practice, there is a way around this limitation.
The Last Resource Commit optimization (sometimes referred to as Last Resource Gambit or Last Agent optimization) allows a single non-XA resource (JMS server or database) to participate in a XA transaction by cleverly ordering the resources.
To enable it, you just have to create a
PoolingConnectionFactory using the bitronix.tm.resource.jms.lrc.LrcXAConnectionFactory as the
Here's an example of code configuring a ActiveMQ datasource:
and the same example viewed as a Resource Loader configuration