From b58252401702b80a8ffa67f4252803ec09ea4fc5 Mon Sep 17 00:00:00 2001 From: Justin Bertram Date: Tue, 28 Feb 2017 13:55:03 -0600 Subject: [PATCH] ARTEMIS-919 JMS reloader reading core queues --- .../artemis/jms/server/impl/JMSServerManagerImpl.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java index 36b4d8b7cc..b5bc7015a8 100644 --- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java +++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java @@ -102,6 +102,7 @@ import org.apache.activemq.artemis.utils.TypedProperties; import org.apache.activemq.artemis.utils.XMLUtil; import org.jboss.logging.Logger; import org.w3c.dom.Element; +import org.w3c.dom.NodeList; /** * A Deployer used to create and add to Bindings queues, topics and connection @@ -1748,11 +1749,13 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback Element e = XMLUtil.stringToElement(xml); if (config instanceof FileJMSConfiguration) { - ((FileJMSConfiguration) config).parse(e, url); - - JMSServerManagerImpl.this.deploy(); + NodeList children = e.getElementsByTagName("jms"); + //if the "jms" element exists then parse it + if (children.getLength() > 0) { + ((FileJMSConfiguration) config).parse((Element) children.item(0), url); + JMSServerManagerImpl.this.deploy(); + } } - } }