From 9df9d3e89140b7329654ad5675259ec6f0c4b3a7 Mon Sep 17 00:00:00 2001 From: Gary Tully Date: Thu, 8 Dec 2011 11:44:36 +0000 Subject: [PATCH] tidy up fix (exception was being lost) for URL: http://svn.apache.org/viewvc?rev=1209841&view=rev Only stop transport for java.lang.SecurityException - as some tests rely on Connection continung after an exception from the broker related to changes in support of fix for https://issues.apache.org/jira/browse/AMQ-3294 and https://issues.apache.org/jira/browse/AMQ-1928 git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1211844 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/activemq/ActiveMQConnection.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java b/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java index b8d56d638f..8727e7b95f 100755 --- a/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java +++ b/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java @@ -1303,8 +1303,8 @@ public class ActiveMQConnection implements Connection, TopicConnection, QueueCon } JMSException jmsEx = null; try { - jmsEx = JMSExceptionSupport.create(er.getException()); - }catch(Throwable e) { + jmsEx = JMSExceptionSupport.create(er.getException()); + } catch(Throwable e) { LOG.error("Caught an exception trying to create a JMSException for " +er.getException(),e); } //dispose of transport for security exceptions @@ -1313,9 +1313,9 @@ public class ActiveMQConnection implements Connection, TopicConnection, QueueCon if (null != t){ ServiceSupport.dispose(t); } - if(jmsEx !=null) { - throw jmsEx; - } + } + if (jmsEx !=null) { + throw jmsEx; } } }