Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 34341 invoked from network); 29 Mar 2010 07:27:32 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Mar 2010 07:27:32 -0000 Received: (qmail 34196 invoked by uid 500); 29 Mar 2010 07:27:32 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 34104 invoked by uid 500); 29 Mar 2010 07:27:30 -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 34096 invoked by uid 99); 29 Mar 2010 07:27:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Mar 2010 07:27:29 +0000 X-ASF-Spam-Status: No, hits=-1159.3 required=10.0 tests=ALL_TRUSTED,AWL 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; Mon, 29 Mar 2010 07:27:28 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3A651234C1F0 for ; Mon, 29 Mar 2010 07:27:08 +0000 (UTC) Message-ID: <769248169.4791269847628237.JavaMail.jira@brutus.apache.org> Date: Mon, 29 Mar 2010 07:27:08 +0000 (UTC) From: "Edwin van der Elst (JIRA)" To: dev@activemq.apache.org Subject: [jira] Commented: (AMQ-2676) Exception sending to an ActiveMQ queue from JBoss in an XA Transaction In-Reply-To: <1724563336.2971269611708004.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c [ https://issues.apache.org/activemq/browse/AMQ-2676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58517#action_58517 ] Edwin van der Elst commented on AMQ-2676: ----------------------------------------- Yes, it looks like I was too focused on getting the integration with the recovery manager working. We should probably remove those changes and find another way to get that part working. > 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 > Attachments: activemq-jms-ds.xml, activemq-ra-5.3.0.jar, jbossts-properties.xml, ra.xml, rar_performance.ear, simpl_ejb_testcase.zip > > > 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': > name="jboss.messaging.destination:service=Queue,name=DemoQueue" > xmbean-dd="xmdesc/Queue-xmbean.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.