35.6 Supporting an alternative embedded transaction manager
The XAConnectionFactoryWrapper
and XADataSourceWrapper
interfaces can be used to support alternative embedded transaction managers. The interfaces are responsible for wrapping XAConnectionFactory
and XADataSource
beans and exposing them as regular ConnectionFactory
and DataSource
beans which will transparently enroll in the distributed transaction. DataSource and JMS auto-configuration will use JTA variants as long as you have a JtaTransactionManager
bean and appropriate XA wrapper beans registered within your ApplicationContext
.
The BitronixXAConnectionFactoryWrapper and BitronixXADataSourceWrapper provide good examples of how to write XA wrappers.