You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Bernhard Schuhmann <bs...@talend.com> on 2011/11/09 14:36:14 UTC
transacted() clause in Java DSL with no effect?
hello,
i'm trying to get a transacted route working and stumbled upon this: my solution works regardless whether i use transacted() in my route or not.
the route is (simplified) this:
from("jms:queue:A).delay(15000).to("jms:queue:B)
or with transacted():
from("jms:queue:A).transacted().delay(15000).to("jms:queue:B)
and the configuration of "jms" is (in spring config):
<bean id="jms" class="org.apache.activemq.camel.component.ActiveMQComponent">
<property name="connectionFactory" ref="poolConnectionFactory"/>
<property name="transacted" value="true"/>
<property name="transactionManager" ref="jmsTransactionManager"/>
</bean>
i've configured the other beans like this:
<bean id="poolConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory">
<property name="maxConnections" value="8"/>
<property name="connectionFactory" ref="jmsConnectionFactory"/>
</bean>
<bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="tcp://localhost:61616"/>
</bean>
<bean id="jmsTransactionManager" class="org.springframework.jms.connection.JmsTransactionManager">
<property name="connectionFactory" ref="poolConnectionFactory"/>
</bean>
what is the relationship between the transacted() clause on the route and the transacted property of the ActiveMQComponent?
does it make any difference if there is a routeID() between from() and transacted()? like this
from("…").routeId("myRoute").transacted()…
thanks in advance!
bernhard schuhmann