Atomikos Forum |
|
I am trying to instruct Atomikos to put its files in user's home directory. Here are the contents from 'transactions.properties'-
com.atomikos.icatch.output_dir=${user.home}/transactions com.atomikos.icatch.log_base_dir=${user.home}/transactions com.atomikos.icatch.console_file_name=my_tm.out com.atomikos.icatch.log_base_name=my_tm.log com.atomikos.icatch.tm_unique_name=my_tm Here Atomikos works perfectly and puts all files under user's home directory. As we are using Spring, so I wanted to get rid of 'transactions.properties' and put this configuration in Spring configuration file as shown below- <bean id="userTransactionService" class="com.atomikos.icatch.config.UserTransactionServiceImp" init-method="init" destroy-method="shutdownForce"> <constructor-arg> <props> <prop key="com.atomikos.icatch.service">com.atomikos.icatch.standalone.UserTransactionServiceFactory</prop> <prop key="com.atomikos.icatch.output_dir">${user.home}/transactions</prop> <prop key="com.atomikos.icatch.log_base_dir">${user.home}/transactions</prop> <prop key="com.atomikos.icatch.console_file_name">my_tm.out</prop> <prop key="com.atomikos.icatch.log_base_name">my_tm.log</prop> <prop key="com.atomikos.icatch.tm_unique_name">my_tm</prop> <prop key="com.atomikos.icatch.console_log_level">INFO</prop> </props> </constructor-arg> </bean> Now instead of finding user home directory it creates a directory named ${user.home} in the current user directory and writes all files there. Should not the 'com.atomikos.icatch.config.UserTransactionServiceImp.java' parse properties passed in the constructor as well like it does in case of transactions.properties? May be I am configuring it incorrectly using Spring, if true, what is the correct way of doing so? Thanks, Vinod
Hey!
You have to configure a PropertyPlaceholderConfigurer bean like this: <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" > <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" /> </bean> Cheers, Martin |