camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: XAResource has not been enlisted
Date Sat, 22 May 2010 07:53:57 GMT
XA can always play tricks on you.
What JTA TM are you using? I assume its something provided by JBoss.

Try finding some JBoss example showing how to use JBoss TM with AMQ.


On Fri, May 21, 2010 at 10:51 PM, greenbean <Kevin.Urciolo@ngc.com> wrote:
>
> I am having trouble working with JTA transactions from JBoss 4, ActiveMA 5.3
> and Camel 2.2.  JMS transactions do not produce problems.  However, we would
> like JTA since we are working with two databases and JMS.
>
> A jms exception containing "Session's XAResource has not been enlisted in a
> distributed transaction." is thrown when the camel "from" part of the route
> (listed below) consumes from an ActiveMQ queue.  Is there something I am
> missing to have the ActiveMQ component enlist in the XA transaction?
>
>    <bean id="myActiveMQComponent"
> class="org.apache.activemq.camel.component.ActiveMQComponent">
>        <property name="configuration" ref="jmsConfig" />
>    </bean>
>
>        <bean id="myActiveMQJmsFactory"
>            class="org.apache.activemq.ActiveMQXAConnectionFactory">
>            <property name="brokerURL"
> value="orderedfailover:tcp://localhost:61616" />
>            <property name="redeliveryPolicy" ref="myRedeliveryPolicy"/>
>        </bean>
>
>     <bean id = "jmsConfig"
> class="org.apache.camel.component.jms.JmsConfiguration">
>         <property name="connectionFactory" ref="myActiveMQJmsFactory"/>
>        <property name="transacted" value="true" />
>        <property name="transactionManager" ref="transactionManager" />
>    </bean>
>
> <camel:route id="testabc" errorHandlerRef="myTransactionErrorHandler">
>            <camel:from uri="myActiveMQComponent:queue:testQueue" />
>            <camel:transacted />
>            <camel:policy ref="PROPAGATION_REQUIRES_NEW_POLICY" />
>            .....
>        </camel:route>
>
>
> --------------------------------------------------------------------------------------------
> javax.jms.JMSException: Session's XAResource has not been enlisted in a
> distributed transaction.
>        at
> org.apache.activemq.ActiveMQXASession.doStartTransaction(ActiveMQXASession.java:109)
>        at
> org.apache.activemq.ActiveMQMessageConsumer.ackLater(ActiveMQMessageConsumer.java:851)
>        at
> org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1100)
>        at
> org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:127)
>        at
> org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:197)
>        at
> org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122)
>        at
> org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>        at java.lang.Thread.run(Thread.java:619)
> --
> View this message in context: http://old.nabble.com/XAResource-has-not-been-enlisted-tp28638707p28638707.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message