Atomikos Forum |
Is this a correct way of inserting config details for transaction service in the spring config file.
<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.console_file_name">${transaction.manager.console.file}</prop> <prop key="com.atomikos.icatch.console_log_level">${transaction.manager.console.log.level}</prop> <prop key="com.atomikos.icatch.log_base_name">${transaction.manager.log.base}</prop> <prop key="com.atomikos.icatch.tm_unique_name">${transaction.manager.unique.name}</prop> <prop key="com.atomikos.icatch.max_timeout">3600000</prop> </props> </constructor-arg> </bean> <bean id="atomikosTransactionManager" class="com.atomikos.icatch.jta.UserTransactionManager" depends-on="userTransactionService"> <property name="startupTransactionService" value="true"/> <property name="forceShutdown" value="true"/> </bean> <bean id="atomikosUserTransaction" class="com.atomikos.icatch.jta.UserTransactionImp" depends-on="userTransactionService"> <property name="transactionTimeout" value="3500" /> </bean> <bean id="jtaTransactionManager" class="org.springframework.transaction.jta.JtaTransactionManager"> <property name="transactionManager" ref="atomikosTransactionManager"/> <property name="userTransaction" ref="atomikosUserTransaction"/> <property name="transactionSynchronizationName" value="SYNCHRONIZATION_ON_ACTUAL_TRANSACTION"/> </bean>
Hi,
I've found that you have to configure an PropertyPlaceholderConfigurer to resolve placeholders like ${transaction.manager.console.file} when using the spring based configuration variant: <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" > <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" /> </bean>
When putting the configuration properties as <prop key> in com.atomikos.icatch.config.UserTransactionServiceImp there is a error message in the console:
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 ... which for our strict administrators is unacceptable. Is is possible to disable that message? |