Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Atomikos library has incompatibility packages (from javax.transaction to jakarta.transaction) #233

Open
sergio-practices opened this issue Oct 29, 2024 · 0 comments

Comments

@sergio-practices
Copy link

I have Atomikos (6.0.0) in Springboot 3 and using Java 21. It's working but using a @deprecated class, "ChainedTransactionManager(transactionManagerOne, transactionManagerTwo)". If fact this way shows me a lot of warnings that i don't like and i want to use the recommended way.

I'm trying this:

@bean
public UserTransaction userTransaction() {
//uses javax.transaction.*
return new UserTransactionImp();
}

@bean(initMethod = "init", destroyMethod = "close")
public TransactionManager transactionManager() {
//uses javax.transaction.*
return new UserTransactionManager();
}

@bean
public PlatformTransactionManager platformTransactionManager() throws Throwable {
//using jakarta.transaction.*
return new JtaTransactionManager(userTransaction(), transactionManager());
}

The object JtaTransactionManager is from the new spring-tx-6.1.6 which uses jakarta.transaction.UserTransaction and jakarta.transaction.TransactionManager objects, but the objects new UserTransactionImp() and new UserTransactionManager() are using the old way, with javax.transaction.UserTransaction and javax.transaction.TransactionManager used in the jar transaction-jta-6.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant