You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: