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.