Uploaded image for project: 'FUSE Mediation Router'
  1. FUSE Mediation Router
  2. MR-98

JMS component with "transactedInOut=false" does not seem to switch off the transaction properly for non-transacted InOut

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.5.2.0-fuse
    • 1.4.4.0-fuse
    • None
    • None

      The issue CAMEL-959 has introduced a new property "transactedInOut" and it is set to false by default. But the JMS endpoint using non-transacted InOut still does not work if the JMS component has following configuration (For more details, please have a look at attached test case):

      ...
      <bean id="activemq"
          class="org.apache.camel.component.jms.JmsComponent">
          <property name="configuration" ref="jmsconfig" />
      </bean>
      		
      <bean id="jmsconfig" class="org.apache.camel.component.jms.JmsConfiguration">
          <property name="connectionFactory" ref="jmsConnectionFactory" />
          <property name="transacted" value="true" />
          <property name="transactedInOut" value="false" />
          <property name="transactionManager" ref="transactionManager" />
      </bean>
      		
      <bean id="transactionManager"
          class="org.springframework.jms.connection.JmsTransactionManager">
          <property name="connectionFactory" ref="jmsConnectionFactory" />
      </bean>
      	
      <bean id="jmsConnectionFactory"
          class="org.apache.activemq.ActiveMQConnectionFactory">
          <property name="brokerURL" value="tcp://localhost:61616" />
      </bean>
      ...
      

      So no messages will be sent to destination queue and replyTo queue at all as a result.

      However, if I configure the JMS component to be entirely non-transacted, i.e. without "transactionManager" bean:

      ...
      <bean id="activemq"
          class="org.apache.camel.component.jms.JmsComponent">
          <property name="configuration" ref="jmsconfig" />
      </bean>
      		
      <bean id="jmsconfig" class="org.apache.camel.component.jms.JmsConfiguration">
          <property name="connectionFactory" ref="jmsConnectionFactory" />
      </bean>
      			
      <bean id="jmsConnectionFactory"
          class="org.apache.activemq.ActiveMQConnectionFactory">
          <property name="brokerURL" value="tcp://localhost:61616" />
      </bean>
      ...
      

      The messages will be sent to destination queue and replyTo queue and it works.

            willem.jiang Willem Jiang (Inactive)
            rhn-support-qluo Joe Luo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: