Atomikos Forum

transaction.properties custom properties not being read

using 3.5.4,

I've set the system variable com.atomikos.icatch.file=foo.properties

and I get this in the output:
Using init file: foo.properties
Failed to open transactions properties file - using default values

None of my properties are being used.

Also, I am having trouble using the Spring "Advanced Case (As of 3.3)" mentioned here: http://www.atomikos.com/Documentation/SpringIntegration

The problem is that the transactions.properties is still being searched for, even if I define com.atomikos.icatch.no_file=true.  How do the UserTransaction and UserTransactionManager use the UserTransactionServiceImp? It seems like a singleton is not being used, and there is a new transaction service created when the TxManager is created.
depstei2 Send private email
Tuesday, April 21, 2009
 
 
Hi,

-Please make sure that foo.properties is in your classpath, not just that it exists

-Please make sure that the no_file system property is set to something not-null (an empty value won't work?)

That should take care of both your problems.

HTH
Guy Pardon Send private email
Wednesday, April 22, 2009
 
 
Thanks Guy,

I think I see the problem, the code to read the file is

UserTransactionServiceImp.java:
java.io.File file = new java.io.File ( filename );

which looks for the file relative to the where the application was started.

But this will not work with files on the classpath unless you do something like this:
java.io.File file = this.getClass().getClassLoader().getResourceAsStream(filename);
depstei2 Send private email
Wednesday, April 22, 2009
 
 
Thanks for the info - I created a case to fix this in our next community release...

Cheers
Guy Pardon Send private email
Wednesday, April 22, 2009
 
 
Hi,

After some research: supporting classpath lookups was not the intention of the system property.

Isn't it OK to specify a path that refers to the working dir of the VM?

HTH
Guy Pardon Send private email
Friday, May 15, 2009
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics