I'm trying to set-up Bitronix in Spring Boot to use last resource gambit with non-XA datasource. Of course by default (autoconfiguration) data source does not participate in XA transaction.
It seems that org.springframework.boot.jta.XADataSourceWrapper will work only for XADataSource.
How to connect DataSource with Bitronix?
Bitronix uses its
LrcXADataSourceto implement the last resource gambit. You need to tell Spring Boot to create anXAResourceof that type:You'll also need to set some other properties that will depend on the database you're using and how it's configured. For example, the name of the JDBC driver class: