spring+atomikos+JTA多數據源配置中,需要注意配置jta.properties文件:
com.atomikos.icatch.service=com.atomikos.icatch.standalone.UserTransactionServiceFactory com.atomikos.icatch.console_file_name = tm.out
com.atomikos.icatch.log_base_name = tmlog com.atomikos.icatch.tm_unique_name = com.atomikos.spring.jdbc.tm com.atomikos.icatch.console_log_level = INFO
com.atomikos.icatch.max_timeout = 300000 (單位是毫秒,注意此參數值最好和spring中整合的com.atomikos.icatch.jta.UserTransactionImp中的transactionTimeout屬性一致)
<bean id="atomikosUserTransaction" class="com.atomikos.icatch.jta.UserTransactionImp">
<property name="transactionTimeout" value="300"/>
</bean>