Spring Boot 3 doesn't support Atomikos.
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide
Support for the following dependencies has been removed in Spring Boot 3.0: Apache ActiveMQ Atomikos EhCache 2 Hazelcast 3
Atomikos published Spring Boot 3 starter module. https://www.atomikos.com/Blog/ExtremeTransactions6dot0
<dependency>
<groupId>com.atomikos</groupId>
<artifactId>transactions-spring-boot3-starter</artifactId>
<version>6.0.109</version>
</dependency>
Can anyone guide me to write a Atomikos configuration to support transaction for JMS and JPA. Many thanks
There is a guide online that describes the steps and includes also a github sample project.
See link: Article distrubuted-transactions-springboot-3-atomikos Github: Github
It uses the transaction essentials which is the open source version of Atomikos.
Also see similar articles here:Atomikos MultiDB Transactions ,atomikos-multi-db-transaction-system and here A Guide to Atomikos
Here is the Official Page of Atomikos that refers to the pom dependencies for spring boot 3: Atomikos official page
In summary here are the steps to follow:
Create Beans for JpaVendorAdapter, UserTransaction, TransactionManager and PlatformTransactionManager.
Define the ConnectionFactory JMS for XA.
Define the Datasource for XA
Also define a jta.properties file inside the resources folder of your spring boot application to specify the settings of Atomikos you prefer. All the available properties are described here: Atomikos properties Also they have already default values.
The initialisation properties are resolved with this order: Property Value Lookup
During the start up of your spring boot application you should see a welcome message from Atomikos in the logs and the list of all the properties with their values.
The approach above overrides the default Spring transaction manager with one provided by Atomikos (UserTransactionManager).
Also the official guide of Atomikos describes which options you have to use: 6.0.109 is the Commercial version "Extreme Transactions", for open source use version 6.0.0 "Transactions Essentials". I would suggest you to read the Release Notes to know what is supported from Atomikos.
And in general if your application is J2EE use J2eeUserTransaction and J2eeTransactionManager.
I think with the above approach the transactions are controlled by the UserTransaction which set the boundaries.
As a continuation it would be useful to check if we can use Atomikos without accessing the UserTransactions, so to expect spring boot container to be able to handle the transactions by itself. And using only these spring boot transaction properties: Spring boot transaction properties