ARTEMIS-601 Reload manager wasn't working with backups
This commit is contained in:
parent
a53dd926a5
commit
c568a9774f
|
@ -84,6 +84,13 @@ public class Artemis {
|
|||
System.err.println(cliException.getMessage());
|
||||
return cliException;
|
||||
}
|
||||
catch (NullPointerException e) {
|
||||
// Yeah.. I really meant System.err..
|
||||
// this is the CLI and System.out and System.err are common places for interacting with the user
|
||||
// this is a programming error that must be visualized and corrected
|
||||
e.printStackTrace();
|
||||
return e;
|
||||
}
|
||||
catch (RuntimeException re) {
|
||||
System.err.println(re.getMessage());
|
||||
System.out.println();
|
||||
|
|
|
@ -274,6 +274,10 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
|
|||
|
||||
@Override
|
||||
public void activationComplete() {
|
||||
ReloadManager reloadManager = server.getReloadManager();
|
||||
if (config != null && config.getConfigurationUrl() != null && reloadManager != null) {
|
||||
reloadManager.addCallback(config.getConfigurationUrl(), new JMSReloader());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -406,11 +410,6 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
|
|||
*/
|
||||
startCalled = true;
|
||||
server.start();
|
||||
ReloadManager reloadManager = server.getReloadManager();
|
||||
if (config != null && config.getConfigurationUrl() != null && reloadManager != null) {
|
||||
reloadManager.addCallback(config.getConfigurationUrl(), new JMSReloader());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -461,12 +461,6 @@ public class ActiveMQServerImpl implements ActiveMQServer {
|
|||
// start connector service
|
||||
connectorsService = new ConnectorsService(configuration, storageManager, scheduledPool, postOffice, serviceRegistry);
|
||||
connectorsService.start();
|
||||
|
||||
this.reloadManager = new ReloadManagerImpl(getScheduledPool(), configuration.getConfigurationFileRefreshPeriod());
|
||||
|
||||
if (configuration.getConfigurationUrl() != null && getScheduledPool() != null) {
|
||||
reloadManager.addCallback(configuration.getConfigurationUrl(), new ConfigurationFileReloader());
|
||||
}
|
||||
}
|
||||
finally {
|
||||
// this avoids embedded applications using dirty contexts from startup
|
||||
|
@ -1952,6 +1946,13 @@ public class ActiveMQServerImpl implements ActiveMQServer {
|
|||
|
||||
deployGroupingHandlerConfiguration(configuration.getGroupingHandlerConfiguration());
|
||||
|
||||
this.reloadManager = new ReloadManagerImpl(getScheduledPool(), configuration.getConfigurationFileRefreshPeriod());
|
||||
|
||||
if (configuration.getConfigurationUrl() != null && getScheduledPool() != null) {
|
||||
reloadManager.addCallback(configuration.getConfigurationUrl(), new ConfigurationFileReloader());
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue