Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AD8A010953 for ; Fri, 19 Jul 2013 09:08:55 +0000 (UTC) Received: (qmail 75750 invoked by uid 500); 19 Jul 2013 09:08:53 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 75664 invoked by uid 500); 19 Jul 2013 09:08:50 -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 75641 invoked by uid 99); 19 Jul 2013 09:08:49 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Jul 2013 09:08:49 +0000 Date: Fri, 19 Jul 2013 09:08:49 +0000 (UTC) From: "Gary Tully (JIRA)" To: dev@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AMQ-4634) Rar losing messages when there is a XA trx timeout (jboss) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMQ-4634?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gary Tully updated AMQ-4634: ---------------------------- Summary: Rar losing messages when there is a XA trx timeout (jboss) (was: Losing messages when there is a XA trx timeout) > Rar losing messages when there is a XA trx timeout (jboss) > ---------------------------------------------------------- > > Key: AMQ-4634 > URL: https://issues.apache.org/jira/browse/AMQ-4634 > Project: ActiveMQ > Issue Type: Bug > Affects Versions: 5.6.0, 5.7.0, 5.8.0 > Environment: JBoss 6.1. > ActiveMQ 5.8.0 (also tested in 5.7.0 and 5.6.0) standalone mode. > Reporter: Gaston Scapusio > Assignee: Gary Tully > Fix For: 5.9.0 > > Attachments: logs.txt > > > ActiveMQ does a trx commit when there is a transaction timeout (EJBTransactionRolledbackException). In this way we are losing messages when there is any timeout. > We have seen that the activemq connections are enlist in XA. > The attribute transactionContext from ActiveMQSession class has the global transaction reference (xid) before calling the MDB (messageListener.onMessage(message)). > When the timeout is reached and the RuntimeException is throwned, the transactionContext losed the xid reference. > Later, when ActiveMQSession call the method transactionContext.isInXATransaction() the result is false because there is no xid reference. > This situation only happened when the MDB calls other EJB (Stateless) with CMT - TransactionAttributeType.REQUIRES_NEW, and the exception is throwed inside the Stateless. > I've tried to reproduce this without calling the stateless ejb but it works well. > The ActiveMQSession class should retain the original transactionContext. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira