When Atomikos is configured via Spring, a jta.properties or transactions.properties file is not needed. Nonetheless, Atomikos starts up with the follow messages printed to stderr:
No properties path set - looking for transactions.properties in classpath...
transactions.properties not found - looking for jta.properties in classpath...
Failed to open transactions properties file - using default values
It makes it look like the Spring configuration didn’t take — although apparently everything is fine. Does anyone know how to get rid of this so I don’t end up getting asked about it 1.000 times?
Is there a way to redirect stderr from a particular component or jar?
You need to set the system property
com.atomikos.icatch.hide_init_file_pathto any value. Do this on the java command line. In maven you do this by passing a command line arg to surefire as follows:Update: From within a Spring configuration file, you can set the property like this:
Just remember to make your Atomikos beans “depend-on” this bean so the order of instantiation is correct.