2

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?
    at com.atomikos.icatch.jta.J2eeUserTransaction.checkSetup(J2eeUserTransaction.java:70)
    at com.atomikos.icatch.jta.J2eeUserTransaction.getStatus(J2eeUserTransaction.java:125)
    at org.springframework.transaction.jta.JtaTransactionManager.
        isExistingTransaction(JtaTransactionManager.java:797)

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?”

Spring Batch: 2.1.8

Atomikos: 3.9.3

aschipfl
  • 33,626
  • 12
  • 54
  • 99

0 Answers0