Atomikos Forum |
Hi,
I tried out the doc. I found that I need to use the following API: ExportingTransactionManager exportingTransactionManager = userTransactionService.getExportingTransactionManager(); com.atomikos.icatch.Propagation propagation = exportingTransactionManager.getPropagation(); Extent extent = doSomething(propagation); exportingTransactionManager.addExtent(extent); The thing is I take the userTransactionService object from Spring definition. But the "ExportingTransactionManager" instance it returns is null. Does someone know what may be the problem? The spring definition is: <bean id="userTransactionService" class="com.atomikos.icatch.config.UserTransactionServiceImp"> <constructor-arg> <props> <prop key="com.atomikos.icatch.service">com.atomikos.icatch.standalone.UserTransactionServiceFactory</prop> <prop key="com.atomikos.icatch.output_dir">${user.home}/transactions</prop> <prop key="com.atomikos.icatch.log_base_dir">${user.home}/transactions</prop> <prop key="com.atomikos.icatch.console_file_name">my_tm.out</prop> <prop key="com.atomikos.icatch.log_base_name">my_tm.log</prop> <prop key="com.atomikos.icatch.tm_unique_name">my_tm</prop> <prop key="com.atomikos.icatch.console_log_level">INFO</prop> </props> </constructor-arg> </bean> <bean id="jtaTransactionManager" class="org.springframework.transaction.jta.JtaTransactionManager" lazy-init="true" depends-on="userTransactionService"> <property name="transactionManager"> <ref bean="atomikosTransactionManager" /> </property> <property name="userTransaction"> <ref bean="atomikosUserTransaction" /> </property> </bean> |