I’m having trouble configuring an Tomcat – Spring Batch – Atomikos combination. I have configured the following (I’m not mentioning the JMS configuration)
- Atomikos DataSource (proxy) based on
com.atomikos.tomcat.EnhancedTomcatAtomikosBeanFactory for Oracle XA datasource.
- JtaTransactionManager based on
> transactionManager based on com.atomikos.icatch.jta.J2eeTransactionManager
> userTransaction based on com.atomikos.icatch.jta.J2eeUserTransaction
When executing a batch job I receive the following error:
Caused by: java.lang.RuntimeException: Transaction Service Not Running?
Debugging revealed the following:
Spring Batch makes use of TaskletStep. This class uses a PlatformTransactionManager that is instantiated with a DataSourceTransactionManager? The datasource is referring to a AtomikosDataSourceBean, that seems ok.
I have several questions:
- Where is this DataSourceTransactionManager coming from?
I have defined a JtaTransactionManager!
/ I thought the AtomikosDataSourceBean acts like a proxy to connect to JtaTransactionManager. Why is Atomikos given the error “Transaction Service Not Running?”
I'm pretty new to this, but I think just creating a JtaTransactionManager isn't enough. Does it use Atomikos-implemented UserTransactionManager and UserTransactionImp?
I'm seeing the same error on Spring startup as some beans come to life, possibly ahead of the transaction managers. By the time the system is done starting everything seems to work (for a little while, see my own post for my Oracle out-of-cursors errors).
When integrating with Spring it is important to configure the right startup ordering for all the beans involved.
The only really sure way to get automatic configuration for Spring / Tomcat platforms is to use ExtremeTransactions - it has built-in support that makes it almost impossible to make mistakes.
This topic is archived. No further replies will be accepted.Other recent topics