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
This commit is contained in:
Gary Tully 2011-12-08 11:44:36 +00:00
parent 760c62934d
commit 9df9d3e891
1 changed files with 5 additions and 5 deletions

View File

@ -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;
}
}
}