Atomikos Forum |
|
Running into problems where jmsTemplate.send is being blocked until originating call session is complete.
Any insights would be welcome. The basic architecture of the system is as follows: Queue listener (DefaultMessagyListenerContainer) awaits messages on specified queue. System processes message and, based on content, makes calls to various external systems by pushing a message on other queues. Returned messages are processed and reply send to original message. I've implemented atomiko jta as described at http://www.atomikos.com/Documentation/SpringIntegration env: Fedora 5 java 5 atomikos 3.2.3 tibco 5.2 Spring 2.0.7
(Unable to put app context in original message)
appContext: <bean id="jtaTransactionManager" class="com.atomikos.icatch.jta.UserTransactionManager" init-method="init" destroy-method="close"> <property name="forceShutdown" value="false" > <bean> <bean id="jtaUserTransaction" class="com.atomikos.icatch.jta.UserTransactionImp"> <property name="transactionTimeout" value="300" > <bean> <bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager"> <property name="transactionManager"> <ref bean="jtaTransactionManager" > <property> <property name="userTransaction"> <ref bean="jtaUserTransaction" > <property> <bean> <bean id="jmsContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer"> <property name="connectionFactory" ref="connectionFactory" > <property name="destinationName" value="TEST.REQUEST" > <property name="messageListener" ref="messageListener" > <property name="transactionManager" ref="transactionManager" > <property name="concurrentConsumers" value="5" > <property name="maxConcurrentConsumers" value="10" > <property name="receiveTimeout" value="3000" > <property name="sessionTransacted" value="true" > <bean> <bean id="tibcoXAConnectionFactory" class="com.tibco.tibjms.TibjmsXAQueueConnectionFactory"> <property name="serverUrl" value="tcp:localhost:7222" > <bean> <bean id="atomikosConnectionFactory" class="com.atomikos.jms.QueueConnectionFactoryBean" init-method="init"> <property name="resourceName" value="QUEUE_BROKER" > <property name="xaQueueConnectionFactory" ref="tibcoXAConnectionFactory" > <bean> <bean id="connectionFactory" class="org.springframework.jms.connection.SingleConnectionFactory"> <property name="targetConnectionFactory" ref="atomikosConnectionFactory" > <bean> <bean id="jmsDBTemplate" abstract="true"> <property name="connectionFactory" ref="dbConnectionFactory" > <property name="defaultDestinationName" value="TEST.ERROR" > <property name="destinationResolver" ref="destinationResolver" > <property name="messageConverter" ref="dbMessageConverter" > <property name="receiveTimeout" value="30000" > <bean> <bean id="Producer1" class="org.springframework.jms.core.JmsTemplate" scope="prototype" parent="jmsDBTemplate"> <property name="defaultDestinationName" value="TEST.PROD1.REQUEST" > <bean> <bean id="Receiver1" class="org.springframework.jms.core.JmsTemplate" scope="prototype" parent="jmsDBTemplate"> <property name="defaultDestinationName" value="TEST.PROD1.RESPONSE" > <bean> <bean id="Producer2" class="org.springframework.jms.core.JmsTemplate" scope="prototype" parent="jmsDBTemplate"> <property name="defaultDestinationName" value="TEST.PROD2.REQUEST" > <bean> <bean id="Receiver2" class="org.springframework.jms.core.JmsTemplate" scope="prototype" parent="jmsDBTemplate"> <property name="defaultDestinationName" value="TEST.PROD2.RESPONSE" > <bean>
The app context that I posted has the work around (non transactional) solution for the jmsDBTemplate bean. The following configuration is the one that fails. In it you will see that it shares the same connectionFactory as the Listener
<bean id="jmsDBTemplate" abstract="true"> <property name="connectionFactory" ref="connectionFactory" > <property name="defaultDestinationName" value="TEST.ERROR" > <property name="destinationResolver" ref="destinationResolver" > <property name="messageConverter" ref="dbMessageConverter" > <property name="receiveTimeout" value="30000" > <bean> |