Atomikos Forum

Configure Transaction Essential out of the properties file

Hi,

I want to know how can I implement the configurations for transaction essential other than using the specific .properties file in the class path.

How can I do it programtically or through exisitng spring config?
Neerav Send private email
Thursday, May 21, 2009
 
 
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>
Neerav Send private email
Thursday, May 21, 2009
 
 
Guy Pardon Send private email
Thursday, May 21, 2009
 
 
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>
Martin Bengl Send private email
Friday, May 22, 2009
 
 
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?
Tomasz Bujok Send private email
Friday, May 22, 2009
 
 
Hi,

You could redirect stderr output I supposed, or throw it away. Otherwise, there is no way to disable this (because this gets done before the logging is initialized, we write this to stderr).


Guy
Guy Pardon Send private email
Wednesday, May 27, 2009
 
 

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

Other recent topics Other recent topics