We have an MDB annontated with:
@TransactionManagement(TransactionManagementType.C ONTAINER)
This MDB is then Spring injected with a service that interacts with XA data source via the JDBC Template. I'm using a Spring config class and I have the following:
@EnableTransactionManagement
@Override
public PlatformTransactionManager annotationDrivenTransactionManager() {
return new WebLogicJtaTransactionManager();
}
My Spring Bean is annotated with @Transactional but when I run it, I get:
org.springframework.transaction.CannotCreateTransa ctionException: No JTA UserTransaction available - programmatic PlatformTransactionManager.getTransaction usage not supported
Why is that and what can I do to resolve this?
@TransactionManagement(TransactionManagementType.C ONTAINER)
This MDB is then Spring injected with a service that interacts with XA data source via the JDBC Template. I'm using a Spring config class and I have the following:
@EnableTransactionManagement
@Override
public PlatformTransactionManager annotationDrivenTransactionManager() {
return new WebLogicJtaTransactionManager();
}
My Spring Bean is annotated with @Transactional but when I run it, I get:
org.springframework.transaction.CannotCreateTransa ctionException: No JTA UserTransaction available - programmatic PlatformTransactionManager.getTransaction usage not supported
Why is that and what can I do to resolve this?