Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 30303 invoked from network); 12 Nov 2010 15:40:28 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 Nov 2010 15:40:28 -0000 Received: (qmail 56037 invoked by uid 500); 12 Nov 2010 15:40:56 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 55855 invoked by uid 500); 12 Nov 2010 15:40:55 -0000 Mailing-List: contact commits-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 commits@activemq.apache.org Received: (qmail 55848 invoked by uid 99); 12 Nov 2010 15:40:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Nov 2010 15:40:54 +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.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Nov 2010 15:40:52 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7631A23889F7; Fri, 12 Nov 2010 15:39:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1034430 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java Date: Fri, 12 Nov 2010 15:39:37 -0000 To: commits@activemq.apache.org From: bsnyder@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101112153937.7631A23889F7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: bsnyder Date: Fri Nov 12 15:39:37 2010 New Revision: 1034430 URL: http://svn.apache.org/viewvc?rev=1034430&view=rev Log: AMQ-3022 - Reverting changes for transaction suspend/resume due to broken tests Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java?rev=1034430&r1=1034429&r2=1034430&view=diff ============================================================================== --- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java (original) +++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/TransactionContext.java Fri Nov 12 15:39:37 2010 @@ -164,7 +164,7 @@ public class TransactionContext implemen } catch (Throwable e) { throw JMSExceptionSupport.create(e); } finally { - synchronizations = null; + synchronizations = null; } } @@ -334,17 +334,12 @@ public class TransactionContext implemen throw new XAException(XAException.XAER_PROTO); } - String txSuspendResumeNotSupportMsg = "The suspend/resume of a transaction " - + "is not supported. Instead it is recommended that a new JMS session be created."; - - if ((flags & TMJOIN) == TMJOIN) { - throw new XAException(txSuspendResumeNotSupportMsg); + // if ((flags & TMJOIN) == TMJOIN) { // TODO: verify that the server has seen the xid - } - if ((flags & TMRESUME) == TMRESUME) { - throw new XAException(txSuspendResumeNotSupportMsg); - // TODO: verify that the xid was suspended. - } + // // } + // if ((flags & TMJOIN) == TMRESUME) { + // // TODO: verify that the xid was suspended. + // } // associate synchronizations = null; @@ -705,20 +700,20 @@ public class TransactionContext implemen * @return the response */ private Response syncSendPacketWithInterruptionHandling(Command command) throws JMSException { - try { - return this.connection.syncSendPacket(command); - } catch (JMSException e) { - if (e.getLinkedException() instanceof InterruptedIOException) { - try { - Thread.interrupted(); - return this.connection.syncSendPacket(command); - } finally { - Thread.currentThread().interrupt(); - } - } - - throw e; - } + try { + return this.connection.syncSendPacket(command); + } catch (JMSException e) { + if (e.getLinkedException() instanceof InterruptedIOException) { + try { + Thread.interrupted(); + return this.connection.syncSendPacket(command); + } finally { + Thread.currentThread().interrupt(); + } + } + + throw e; + } } /**