Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A3EEC2009EE for ; Wed, 18 May 2016 19:47:16 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A2A76160A26; Wed, 18 May 2016 17:47:16 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id F2055160A00 for ; Wed, 18 May 2016 19:47:15 +0200 (CEST) Received: (qmail 38307 invoked by uid 500); 18 May 2016 17:47:15 -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 38281 invoked by uid 99); 18 May 2016 17:47:15 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 May 2016 17:47:15 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 13D5DDFADE; Wed, 18 May 2016 17:47:15 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jbertram@apache.org To: commits@activemq.apache.org Date: Wed, 18 May 2016 17:47:17 -0000 Message-Id: In-Reply-To: <465cbe7522124ed9a2fe16c1492de9f8@git.apache.org> References: <465cbe7522124ed9a2fe16c1492de9f8@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [3/4] activemq-artemis git commit: ARTEMIS-525 Interrupted Thread should throw JMS Exceptions over the JMS layer archived-at: Wed, 18 May 2016 17:47:16 -0000 ARTEMIS-525 Interrupted Thread should throw JMS Exceptions over the JMS layer Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/a75bd763 Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/a75bd763 Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/a75bd763 Branch: refs/heads/master Commit: a75bd7630af24b6b48e5cfa23fa5c2a4aacda9cc Parents: 3e2adf1 Author: Clebert Suconic Authored: Tue May 17 19:33:36 2016 -0400 Committer: Clebert Suconic Committed: Tue May 17 20:28:40 2016 -0400 ---------------------------------------------------------------------- .../activemq/artemis/jms/client/ActiveMQMessageConsumer.java | 6 ++++++ 1 file changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a75bd763/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageConsumer.java ---------------------------------------------------------------------- diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageConsumer.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageConsumer.java index 8929fa5..53242f1 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageConsumer.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageConsumer.java @@ -218,6 +218,7 @@ public final class ActiveMQMessageConsumer implements QueueReceiver, TopicSubscr jmsMsg.doBeforeReceive(); } catch (IndexOutOfBoundsException ioob) { + ((ClientSessionInternal)session.getCoreSession()).markRollbackOnly(); // In case this exception happen you will need to know where it happened. // it has been a bug here in the past, and this was used to debug it. // nothing better than keep it for future investigations in case it happened again @@ -240,6 +241,11 @@ public final class ActiveMQMessageConsumer implements QueueReceiver, TopicSubscr return jmsMsg; } catch (ActiveMQException e) { + ((ClientSessionInternal)session.getCoreSession()).markRollbackOnly(); + throw JMSExceptionHelper.convertFromActiveMQException(e); + } + catch (ActiveMQInterruptedException e) { + ((ClientSessionInternal)session.getCoreSession()).markRollbackOnly(); throw JMSExceptionHelper.convertFromActiveMQException(e); } }