- configPusher.pushConfigs(configs);
- } catch (NetconfDocumentedException e) {
- logger.error("Error pushing configs {}",configs);
- throw new IllegalStateException(e);
- }
- logger.info("Configuration Persister initialization completed.");
-
- /*
- * We have completed initial configuration. At this point
- * it is good idea to perform garbage collection to prune
- * any garbage we have accumulated during startup.
- */
- logger.debug("Running post-initialization garbage collection...");
- System.gc();
- logger.debug("Post-initialization garbage collection completed.");
-
- ConfigPersisterNotificationHandler jmxNotificationHandler = new ConfigPersisterNotificationHandler(platformMBeanServer, persisterAggregator);
- synchronized (ConfigPersisterActivator.this) {
- autoCloseables.add(jmxNotificationHandler);
+ 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 {
+ LOG.warn("Unable to process configs as BundleContext is null");
+ }
+ } catch (InterruptedException e) {
+ LOG.info("ConfigPusher thread stopped",e);