Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 41290 invoked from network); 26 Mar 2010 13:55:32 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 26 Mar 2010 13:55:32 -0000 Received: (qmail 10048 invoked by uid 500); 26 Mar 2010 13:55:32 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 10011 invoked by uid 500); 26 Mar 2010 13:55:32 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 10003 invoked by uid 99); 26 Mar 2010 13:55:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Mar 2010 13:55:32 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Mar 2010 13:55:29 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 0289B234C4B2 for ; Fri, 26 Mar 2010 13:55:08 +0000 (UTC) Message-ID: <1724563336.2971269611708004.JavaMail.jira@brutus.apache.org> Date: Fri, 26 Mar 2010 13:55:08 +0000 (UTC) From: "Edwin van der Elst (JIRA)" To: dev@activemq.apache.org Subject: [jira] Created: (AMQ-2676) Exception sending to an ActiveMQ queue from JBoss in an XA Transaction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c X-Virus-Checked: Checked by ClamAV on apache.org Exception sending to an ActiveMQ queue from JBoss in an XA Transaction ---------------------------------------------------------------------- Key: AMQ-2676 URL: https://issues.apache.org/activemq/browse/AMQ-2676 Project: ActiveMQ Issue Type: Bug Components: Connector Affects Versions: 5.3.0 Reporter: Edwin van der Elst We are trying to use an inbound and outbound queue on a remote ActiveMQ instance using XA transactions. Receiving seems to work ok, but when we send a message, the ActiveMQ RA gives an exception saying that the session is not 'enlisted to a distributed transaction'. If we use JBoss Messaging, there is no exception, but the thread on this forum http://community.jboss.org/thread/149573 gives me the impression that JBMQ just works without the transaction in that situation, without throwing an exception. To work around a classcastexception on the QueueConnectionFactory we use a patched version of the activemq-rar-adapter (see also https://issues.apache.org/activemq/browse/AMQ-2670). his is the test application & configuration. To set it up, a regular JBoss 5.1.0-GA can be used (compiled for java 6). Changes in configuration: - unzipped activemq-rar (5.3.0), with the new class I wrote as a 'hack'. The ra.xml is attached to this message, as is the replacement for the jar jbossts-properties.xml - Has the ActiveMQProvider registered for XA recovery purposes activemq-jms-ds.xml, must be placed in the deploy folder Test application: I commented out the persistence stuff, that is not related to the issue. The application deploys a MDB and a SLSB. For running the test, you need an ActiveMQ instance on localhost :61616 (default) To get the error, you can call the SLSB directly (see Test.java, put jboss-all-client.jar on the cp and the ejbjar). The helloWorld method sends to ActiveMQ. The sendJBoss method uses a JBoss Messaging Queue (this doesn't give the Exception, but I'm not sure that this means it actually runs in a XA transaction) To deploy the JBoss queue, you need to add this fragment to the 'deploy/messaging/destinations-service.xml': jboss.messaging:service=ServerPeer jboss.messaging:service=PostOffice The rar_performance.ear is the compiled testcase. To rebuild, unzip the 'simple_ejb_testcase' and perform a mvn install in te 'simple_mdb' folder and in the 'simple_mdb_ear' folder (there is no parent pom.xml). The exception: 11:56:28,851 ERROR [STDERR] javax.jms.JMSException: Session's XAResource has not been enlisted in a distributed transaction. 11:56:28,852 ERROR [STDERR] at org.apache.activemq.ActiveMQXASession.doStartTransaction(ActiveMQXASession.java:109) 11:56:28,852 ERROR [STDERR] at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1636) 11:56:28,852 ERROR [STDERR] at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:231) 11:56:28,852 ERROR [STDERR] at org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:241) 11:56:28,852 ERROR [STDERR] at gts.ise.refdata.domain.complexinstrument.HelloBean.helloWorld(HelloBean.java:46) 11:56:28,852 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 11:56:28,852 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 11:56:28,852 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 11:56:28,852 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.