camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greenbean <Kevin.Urci...@ngc.com>
Subject Camel Transacted Routes With ActiveMQ And Bitronix
Date Tue, 09 Nov 2010 15:25:07 GMT

Reposting after subscribing to mail list...

I am getting an error when using Camel to consumer a JMS message in a FROM
as part of a route in a JTA transactions using Bitronix.  The error below
appears when "allowLocalTransactions" in Bitronix is false.  If I set
"allowLocalTransactions" to true, then I don't see the error.  However,
since I am using JTA, my route is set to transacted, and my connection
factory objects are XA, I thought I should not need local transactions.  I
am using a similar setup without Camel (using the
DefaultMessageListenerContainer directly), and it works as expected with JTA
and "allowLocalConnections" set to false.  Do I have something in my camel
configuration set incorrectly? 

Error: 
2010-11-08 21:32:34,304 WARN 
[org.springframework.jms.listener.DefaultMessageListenerContainer]
(threadPoolExecutor-0) Setup of JMS message listener invoker failed for
destination 'DLQ.processorQueue' - trying to recover. Cause: error enlisting
a MessageConsumerWrapper of a DualSessionWrapper in state ACCESSIBLE of a
JmsPooledConnection of pool activemq-activeMQJmsFactory in state ACCESSIBLE
with underlying connection ActiveMQConnection
{id=ID:csnwas6-25037-1289251901943-0:5,clientId=ID:csnwas6-25037-1289251901943-6:0,started=true}

--------------------------------------------------------------- 

Software: 
Camel 2.4.0 
ActiveMQ 5.4.0 
Bitronix 2.0.1 
--------------------------------------------------------------- 
<camel:route errorHandlerRef="transactionErrorHandler"> 
            <camel:from 
               
uri="activeMQComponent:queue:DLQ.processorQueue?concurrentConsumers=1" /> 
            <camel:transacted ref="PROPAGATION_REQUIRED_POLICY" /> 
            <camel:doTry> 
                <camel:process ref="exceptionThrowingProcessor" /> 
                <camel:doCatch> 
                   
<camel:exception>org.springframework.dao.DataAccessException</camel:exception>

                   
<camel:exception>org.springframework.dao.DataRetrievalFailureException</camel:exception>

                   
<camel:exception>com.InvalidDataException</camel:exception> 
                    <camel:exception>java.lang.Throwable</camel:exception> 
            <camel:to uri="bean:exchangeComboUtilities?method=translateTo"
/> 
                    <camel:marshal ref="xstream-default"/> 
                    <camel:setHeader headerName="marshalledMessage"> 
                        <camel:mvel>request.body</camel:mvel> 
                    </camel:setHeader> 
                    <camel:setBody> 
                       
<camel:mvel>request.headers.ORIGINAL_PAYLOAD</camel:mvel> 
                    </camel:setBody> 
                    <camel:to
uri="bean:errorProcessor?method=handleProcessingException" /> 
                </camel:doCatch> 
            </camel:doTry> 
        </camel:route> 
--------------------------------------------------------------- 
    <bean id="activeMQComponent"
class="org.apache.activemq.camel.component.ActiveMQComponent"> 
         <property name="connectionFactory" ref="activeMQJmsFactory"/> 
        <property name="transacted" value="true" /> 
        <property name="transactionManager" ref="transactionManager" /> 
        <property name="acknowledgementModeName" value="TRANSACTED" /> 
        <property name="taskExecutor" ref="concurrentTaskExecutor" /> 
    </bean> 
--------------------------------------------------------------- 
    <bean id="activeMQJmsFactory"
class="bitronix.tm.resource.jms.PoolingConnectionFactory" init-method="init" 
        destroy-method="close"> 
        <property name="className"
value="org.apache.activemq.ActiveMQXAConnectionFactory" /> 
        <property name="uniqueName" value="activemq-activeMQJmsFactory" /> 
        <property name="maxPoolSize" value="35" /> 
        <property name="twoPcOrderingPosition" value="-1" /> 
        <property name="allowLocalTransactions" value="false" /> 
        <property name="driverProperties"> 
            <props> 
                <prop key="brokerURL">failover:tcp://localhost:61616</prop> 
            </props> 
        </property> 
    </bean> 
---------------------------------------------------------------  


-- 
View this message in context: http://camel.465427.n5.nabble.com/Camel-Transacted-Routes-With-ActiveMQ-And-Bitronix-tp3257037p3257037.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message