How to replace atomikos in distributed transaction in spring boot 3

2.3k Views Asked by At

I try to follow migration guide when atomikos was removed in spring boot 3: https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide

but I can no see information about it. Other frameworks like narayana or bitronix is also not in spring boot dependencies.

2

There are 2 best solutions below

0
simyaci On

Spring had direct support for distributed transaction tools like Atomikos in the past. However, starting from Spring 3, this support has been discontinued, as indicated in the Spring Boot 3.0 Migration Guide. You can use followıng dependency.

<dependency>
   <groupId>com.atomikos</groupId>
   <artifactId>transactions-spring-boot3-starter</artifactId>
   <version>6.0.0</version>
</dependency>

<dependency>
   <groupId>javax.transaction</groupId>
   <artifactId>jta</artifactId>
   <version>1.1</version>
</dependency>

You can look at here for full code and article.

0
Guy Pardon On

Courtesy of the Spring Boot team, Atomikos now includes its own starter project for spring boot - supporting both JakartaEE and "good old" javax EE.

Just check the atomikos website for the latest.