I'm running a J2SE application that uses Atomikos which dumps it's numerous log files to the current directory. I'd like to move the location of these files to "/tmp", but I cannot locate a configuration property that I can set from within my Spring XML config file.
The Atomikos documentation references a property:
com.atomikos.icatch.output_dir
Which seems exactly what I need, but how to set from Spring it without a jta.properties file? Here is my transaction manager config:
<bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
<property name="transactionManager" ref="atomikosTransactionManager" />
<property name="userTransaction" ref="atomikosUserTransaction" />
</bean>
<bean id="atomikosTransactionManager" class="com.atomikos.icatch.jta.UserTransactionManager"
init-method="init" destroy-method="close">
<!-- When close is called, should we force transactions to terminate? -->
<property name="forceShutdown" value="false" />
</bean>
<bean id="atomikosUserTransaction" class="com.atomikos.icatch.jta.UserTransactionImp">
<!-- Number of seconds before transaction timesout. -->
<property name="transactionTimeout" value="30" />
</bean>
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:
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: