- configPusher.pushConfigs(configs);
- logger.info("Configuration Persister initialization completed.");
- ConfigPersisterNotificationHandler jmxNotificationHandler = new ConfigPersisterNotificationHandler(platformMBeanServer, persisterAggregator);
- synchronized (ConfigPersisterActivator.this) {
- autoCloseables.add(jmxNotificationHandler);
+ try {
+ if(configs != null && !configs.isEmpty()) {
+ configPusher.pushConfigs(configs);
+ }
+ if(context != null) {
+ registration = context.registerService(ConfigPusher.class.getName(), configPusher, null);
+ configPusher.process(autoCloseables, platformMBeanServer, persisterAggregator);
+ } else {
+ logger.warn("Unable to process configs as BundleContext is null");
+ }
+ } catch (InterruptedException e) {
+ logger.info("ConfigPusher thread stopped",e);