You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ve...@apache.org on 2016/12/19 14:15:11 UTC
svn commit: r1775102 -
/axis/axis2/java/core/trunk/modules/transport/jms/src/main/java/org/apache/axis2/transport/jms/JMSUtils.java
Author: veithen
Date: Mon Dec 19 14:15:11 2016
New Revision: 1775102
URL: http://svn.apache.org/viewvc?rev=1775102&view=rev
Log:
AXIS2-5824: Avoid misleading JMS lookup exception referring to dynamic(Queues|Topics).
Modified:
axis/axis2/java/core/trunk/modules/transport/jms/src/main/java/org/apache/axis2/transport/jms/JMSUtils.java
Modified: axis/axis2/java/core/trunk/modules/transport/jms/src/main/java/org/apache/axis2/transport/jms/JMSUtils.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/transport/jms/src/main/java/org/apache/axis2/transport/jms/JMSUtils.java?rev=1775102&r1=1775101&r2=1775102&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/transport/jms/src/main/java/org/apache/axis2/transport/jms/JMSUtils.java (original)
+++ axis/axis2/java/core/trunk/modules/transport/jms/src/main/java/org/apache/axis2/transport/jms/JMSUtils.java Mon Dec 19 14:15:11 2016
@@ -721,7 +721,10 @@ public class JMSUtils extends BaseUtils
"dynamicTopics/" : "dynamicQueues/") + destinationName);
} catch (NamingException x) {
log.warn("Cannot locate destination : " + destinationName);
- throw x;
+ // Rethrow the original exception. If we get here this most likely means that
+ // the JMS provider doesn't support dynamic(Queues|Topics) and we should simply
+ // report the original lookup failure.
+ throw e;
}
} catch (NamingException e) {
log.warn("Cannot locate destination : " + destinationName, e);