Hi,

I use ActiveMQ with Jencks pool and Geronimo Transaction Manager. Simple Spring context looks like:

<beans>

        <!-- ActiveMQ Broker configuration -->
<bean id="broker" class="org.apache.activemq.broker.BrokerService" init-method="start" destroy-method="stop">
                <property name="persistent" value="false"/>
                <property name="transportConnectorURIs">
                        <list>
                                <value>tcp://localhost:5000</value>
                        </list>
                </property>
        </bean>

        <!-- Geronimo Transaction Manager -->
<bean id="transactionContextManager" class="org.jencks.factory.TransactionContextManagerFactoryBean"/> <bean id="transaction" class="org.jencks.factory.GeronimoTransactionManagerFactoryBean"/> <bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
                <property name="userTransaction" ref="transaction" />
        </bean>
        
        <!-- ActiveMQ XA pooled connection configuration -->
<bean id="jmsConnectionFactory" class="org.jencks.pool.PooledSpringXAConnectionFactory">
                <property name="connectionFactory">
                        <bean 
class="org.apache.activemq.ActiveMQXAConnectionFactory">
                                <property name="brokerURL" 
value="tcp://localhost:5000" />
                        </bean>
                </property>
                <property name="transactionManager" ref="transaction"/>
        </bean>
        
        <!-- Business logic beans -->
<bean id="messageListener" class="jta.spring.manual.MessageListenerWrapper">
                <property name="connectionFactory" ref="jmsConnectionFactory"/>
                <property name="transactionManager" ref="transactionManager"/>
        </bean>
        
</beans>

With long running transactions I got something like:

org.springframework.transaction.UnexpectedRollbackException: JTA transaction unexpectedly rolled back (maybe due to a timeout); nested exception is javax.transaction.RollbackException: Transaction timout

Is it possible to increase Geronimo Transaction Manager timeout? Which bean and which property need I change in may case?

--
Thanks,
Eugene Prokopiev

Reply via email to