You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by mattmadhavan <ma...@yahoo.com> on 2014/07/23 16:16:18 UTC
Camel/ActiveMQ RequestReply Transaction Question
Hello,
I have some basic questions on Camel/ActiveMQ transactions with
request/reply jms endpoints/
Have the following route. ( i basically took the example request/reply jms
example from the Camel in action book and springiified).
When I have the transactionManager attribute pf the ActiveMQ component
commented I am able to send and receive message from jms:incomingOrders to
jms:validate and back from within a transaction (please note the <transacted
ref="PROPAGATION_REQUIRED"/>)
......
<bean id="jms"
class="org.apache.activemq.camel.component.ActiveMQComponent">
<property name="connectionFactory" ref="connectionFactory"/>
</bean>
<camelContext xmlns="http://camel.apache.org/schema/spring" trace="true">
<route>
<from uri="jms:incomingOrders"/>
<transacted ref="PROPAGATION_REQUIRED"/>
<log message=" ==============================> Processing message:
${body}"/>
<inOut uri="jms:validate"/>
<to uri="mock:out"/>
<log message=" ==============================> After Validation
message: ${body}"/>
</route>
<route>
<from uri="jms:validate"/>
<transacted ref="PROPAGATION_NOT_SUPPORTED"/>
<log message=" +++++++++++++++++++++++++++++++++++++>
Processing message: ${body}"/>
<bean ref="validator"/>
</route>
</camelContext>
But when I uncomment /enable the transactionManager property of the
JMS(ActiveMQ) component, the request to jms:validate times out!
<bean id="jms"
class="org.apache.activemq.camel.component.ActiveMQComponent">
<property name="connectionFactory" ref="connectionFactory"/>
property name="transactionManager" ref="jmsTransactionManager"/>
</bean>
I do understand the processing within jms:validate works in its own thread
and hence the transaction is not propagated.
My basic question is can I have JMS reuest/reply from with in another jms
end point that is transacted.
Any ideas please? Also if you guys can point me to documentation regarding
this I will appreciate it.
I appreciate in advance
-----
Thanks
Matt G. Madhavan
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-ActiveMQ-RequestReply-Transaction-Question-tp5754305.html
Sent from the Camel - Users mailing list archive at Nabble.com.