camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernhard Schuhmann <bschuhm...@talend.com>
Subject transacted() clause in Java DSL with no effect?
Date Wed, 09 Nov 2011 13:36:14 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message