FAQ
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.

Search Discussions

  • Waterback at Jan 19, 2011 at 3:11 pm
    Hello Greenbean,

    sorry i have no solution since i have a very similar problem...
    Do you have some sort of solution?

    Thanx,
    Martin
    --
    View this message in context: http://camel.465427.n5.nabble.com/Camel-Transacted-Routes-With-ActiveMQ-And-Bitronix-tp3257037p3347996.html
    Sent from the Camel - Users mailing list archive at Nabble.com.
  • Greenbean at Jan 19, 2011 at 4:15 pm
    I worked with the developer on Bitronix. He provided a fix in
    BTM-2.1.1. It looks like the Bitronix web site is still at BTM-2.1.0.
    You might want to ask for 2.1.1 to be released. The fix might be in the
    source repository as well.







    From: waterback [via Camel]

    Sent: Wednesday, January 19, 2011 10:11 AM
    To: Urciolo, Kevin J (IS)
    Subject: EXTERNAL:Re: Camel Transacted Routes With ActiveMQ And Bitronix



    Hello Greenbean,

    sorry i have no solution since i have a very similar problem...
    Do you have some sort of solution?

    Thanx,
    Martin

    ________________________________

    If you reply to this email, your message will be added to the discussion
    below:

    http://camel.465427.n5.nabble.com/Camel-Transacted-Routes-With-ActiveMQ-
    And-Bitronix-tp3257037p3347996.html

    To unsubscribe from Camel Transacted Routes With ActiveMQ And Bitronix,
    click here
    <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubs
    cribe_by_code&node=3257037&code=S2V2aW4uVXJjaW9sb0BuZ2MuY29tfDMyNTcwMzd8
    MTc2MDkyNzEzMw==> .


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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriescamel
postedNov 9, '10 at 3:25p
activeJan 19, '11 at 4:15p
posts3
users2
websitecamel.apache.org

2 users in discussion

Greenbean: 2 posts Waterback: 1 post

People

Translate

site design / logo © 2022 Grokbase