activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbert...@apache.org
Subject [3/4] activemq-artemis git commit: ARTEMIS-525 Interrupted Thread should throw JMS Exceptions over the JMS layer
Date Wed, 18 May 2016 17:47:17 GMT
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 <clebertsuconic@apache.org>
Authored: Tue May 17 19:33:36 2016 -0400
Committer: Clebert Suconic <clebertsuconic@apache.org>
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);
       }
    }


Mime
View raw message