How to move location of Atomikos's tm.out and *.epoch files?

江枫思渺然 提交于 2019-12-04 04:45:08

The property in question must be set on the singleton instance of the transactionService -- an object that is normally created on-demand by the user transaction manager:

<bean id="userTransactionService" class="com.atomikos.icatch.config.UserTransactionServiceImp"
    init-method="init" destroy-method="shutdownForce">
    <constructor-arg>
        <!-- IMPORTANT: specify all Atomikos properties here -->
        <props>
            <prop key="com.atomikos.icatch.service">com.atomikos.icatch.standalone.UserTransactionServiceFactory</prop>
            <prop key="com.atomikos.icatch.output_dir">target/</prop>
            <prop key="com.atomikos.icatch.log_base_dir">target/</prop>
        </props>
    </constructor-arg>
</bean>

Now the property is set. But in order to ensure you don't have two transaction services running you must also modify the user transaction manager bean as follows:

<bean id="atomikosTransactionManager" class="com.atomikos.icatch.jta.UserTransactionManager"
    init-method="init" destroy-method="close" depends-on="userTransactionService">
    <!-- When close is called, should we force transactions to terminate? -->
    <property name="forceShutdown" value="false" />
    <!-- Do not create a transaction service as we have specified the bean in this file -->
    <property name="startupTransactionService" value="false" />
</bean>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!