This closes #1859
This commit is contained in:
commit
8b46024181
|
@ -3103,20 +3103,22 @@ public class ActiveMQServerImpl implements ActiveMQServer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reload(URL uri) throws Exception {
|
public void reload(URL uri) throws Exception {
|
||||||
Configuration config = new FileConfigurationParser().parseMainConfig(uri.openStream());
|
if (isActive()) {
|
||||||
ActiveMQServerLogger.LOGGER.reloadingConfiguration("security");
|
Configuration config = new FileConfigurationParser().parseMainConfig(uri.openStream());
|
||||||
securityRepository.swap(config.getSecurityRoles().entrySet());
|
ActiveMQServerLogger.LOGGER.reloadingConfiguration("security");
|
||||||
ActiveMQServerLogger.LOGGER.reloadingConfiguration("address settings");
|
securityRepository.swap(config.getSecurityRoles().entrySet());
|
||||||
addressSettingsRepository.swap(config.getAddressesSettings().entrySet());
|
ActiveMQServerLogger.LOGGER.reloadingConfiguration("address settings");
|
||||||
ActiveMQServerLogger.LOGGER.reloadingConfiguration("diverts");
|
addressSettingsRepository.swap(config.getAddressesSettings().entrySet());
|
||||||
for (DivertConfiguration divertConfig : config.getDivertConfigurations()) {
|
ActiveMQServerLogger.LOGGER.reloadingConfiguration("diverts");
|
||||||
if (postOffice.getBinding(new SimpleString(divertConfig.getName())) == null) {
|
for (DivertConfiguration divertConfig : config.getDivertConfigurations()) {
|
||||||
deployDivert(divertConfig);
|
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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue