Atomikos Forum |
|
I am trying to use the "file" property to indicate where Atomikos (v 3.6.4) should find my jta.properties file:
<bean id="userTransactionService" class="com.atomikos.icatch.config.UserTransactionServiceImp" init-method="init" destroy-method="shutdownForce"> <constructor-arg> <props> <prop key="com.atomikos.icatch.file">/etc/myapp/jta.properties</prop> <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> The jta.properties file is still not being found. The /etc/myapp directory is not on the classpath. Is this a problem?
Have you got a chance to take a look at this one
http://www.atomikos.com/Documentation/JtaProperties It clearly points these points 1) You can do so by creating a jta.properties file at the root of your classpath. 2) java -Dcom.atomikos.icatch.file=<path_to_your_file> ... You need either of them to get it working! Regards, -VK
Thanks. I've read that page many times, but for whatever reason it doesn't seem to work.
Are you saying that that property cannot be set via Spring? I've also tried to set the property via $JAVA_OPTS and that didn't work either. I am wondering if the file HAS to be on the classpath AND you set it via the file property....
After examining the source code I answered my own question. No, it does not have to be on the classpath. However, the property cannot be set via Spring because it MUST be a system property. In the case of Maven, for example, I had to provide it via the surefire plugin argList configuration.
|