[1/2] activemq-artemis git commit: This closes #1859

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[1/2] activemq-artemis git commit: This closes #1859

clebertsuconic-2
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 01748b9c4 -> 8b4602418


This closes #1859


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/8b460241
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/8b460241
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/8b460241

Branch: refs/heads/master
Commit: 8b460241818f77f8cf6b4aa3299cb3dbffd0db62
Parents: 01748b9 70406bf
Author: Clebert Suconic <[hidden email]>
Authored: Fri Feb 9 09:05:53 2018 -0500
Committer: Clebert Suconic <[hidden email]>
Committed: Fri Feb 9 09:05:53 2018 -0500

----------------------------------------------------------------------
 .../core/server/impl/ActiveMQServerImpl.java    | 26 +++++++++++---------
 1 file changed, 14 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


Reply | Threaded
Open this post in threaded view
|

[2/2] activemq-artemis git commit: ARTEMIS-1659 - Only reload configuration if the node is Active.

clebertsuconic-2
ARTEMIS-1659 - Only reload configuration if the node is Active.



Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/70406bf2
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/70406bf2
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/70406bf2

Branch: refs/heads/master
Commit: 70406bf21c9b65664ed1f011b3d7cebffda88593
Parents: 01748b9
Author: Michael André Pearce <[hidden email]>
Authored: Fri Feb 2 17:18:21 2018 +0000
Committer: Clebert Suconic <[hidden email]>
Committed: Fri Feb 9 09:05:53 2018 -0500

----------------------------------------------------------------------
 .../core/server/impl/ActiveMQServerImpl.java    | 26 +++++++++++---------
 1 file changed, 14 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/70406bf2/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
index d7eb2b9..dad9300 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
@@ -3103,20 +3103,22 @@ public class ActiveMQServerImpl implements ActiveMQServer {
 
       @Override
       public void reload(URL uri) throws Exception {
-         Configuration config = new FileConfigurationParser().parseMainConfig(uri.openStream());
-         ActiveMQServerLogger.LOGGER.reloadingConfiguration("security");
-         securityRepository.swap(config.getSecurityRoles().entrySet());
-         ActiveMQServerLogger.LOGGER.reloadingConfiguration("address settings");
-         addressSettingsRepository.swap(config.getAddressesSettings().entrySet());
-         ActiveMQServerLogger.LOGGER.reloadingConfiguration("diverts");
-         for (DivertConfiguration divertConfig : config.getDivertConfigurations()) {
-            if (postOffice.getBinding(new SimpleString(divertConfig.getName())) == null) {
-               deployDivert(divertConfig);
+         if (isActive()) {
+            Configuration config = new FileConfigurationParser().parseMainConfig(uri.openStream());
+            ActiveMQServerLogger.LOGGER.reloadingConfiguration("security");
+            securityRepository.swap(config.getSecurityRoles().entrySet());
+            ActiveMQServerLogger.LOGGER.reloadingConfiguration("address settings");
+            addressSettingsRepository.swap(config.getAddressesSettings().entrySet());
+            ActiveMQServerLogger.LOGGER.reloadingConfiguration("diverts");
+            for (DivertConfiguration divertConfig : config.getDivertConfigurations()) {
+               if (postOffice.getBinding(new SimpleString(divertConfig.getName())) == null) {
+                  deployDivert(divertConfig);
+               }
             }
+            ActiveMQServerLogger.LOGGER.reloadingConfiguration("addresses");
+            deployAddressesFromConfiguration(config);
+            undeployAddressesAndQueueNotInConfiguration(config);
          }
-         ActiveMQServerLogger.LOGGER.reloadingConfiguration("addresses");
-         deployAddressesFromConfiguration(config);
-         undeployAddressesAndQueueNotInConfiguration(config);
       }
    }