X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fconfig%2Fconfig-manager%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fmanager%2Fimpl%2Fdependencyresolver%2FDestroyedModule.java;h=dae6cb27e4b9777e77497a805565a5c57284791c;hp=05c10077c46f07e25b36a2811b836c1725a1493b;hb=37b0822a7a60079ccaaf261e8ee4eb6a3636c1a0;hpb=2294805f83434db1d248e629767da6a563ce595f diff --git a/opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/dependencyresolver/DestroyedModule.java b/opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/dependencyresolver/DestroyedModule.java index 05c10077c4..dae6cb27e4 100644 --- a/opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/dependencyresolver/DestroyedModule.java +++ b/opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/dependencyresolver/DestroyedModule.java @@ -9,6 +9,7 @@ package org.opendaylight.controller.config.manager.impl.dependencyresolver; import org.opendaylight.controller.config.api.ModuleIdentifier; import org.opendaylight.controller.config.manager.impl.jmx.ModuleJMXRegistrator; +import org.opendaylight.controller.config.manager.impl.jmx.RootRuntimeBeanRegistratorImpl; import org.opendaylight.controller.config.manager.impl.osgi.BeanToOsgiServiceManager.OsgiRegistration; import org.opendaylight.yangtools.concepts.Identifiable; import org.slf4j.Logger; @@ -30,15 +31,18 @@ public class DestroyedModule implements AutoCloseable, private final ModuleJMXRegistrator oldJMXRegistrator; private final OsgiRegistration osgiRegistration; private final int orderingIdx; + private RootRuntimeBeanRegistratorImpl runtimeBeanRegistrator; public DestroyedModule(ModuleIdentifier identifier, AutoCloseable instance, - ModuleJMXRegistrator oldJMXRegistrator, - OsgiRegistration osgiRegistration, int orderingIdx) { + ModuleJMXRegistrator oldJMXRegistrator, + OsgiRegistration osgiRegistration, int orderingIdx, + final RootRuntimeBeanRegistratorImpl runtimeBeanRegistrator) { this.identifier = identifier; this.instance = instance; this.oldJMXRegistrator = oldJMXRegistrator; this.osgiRegistration = osgiRegistration; this.orderingIdx = orderingIdx; + this.runtimeBeanRegistrator = runtimeBeanRegistrator; } @Override @@ -54,6 +58,13 @@ public class DestroyedModule implements AutoCloseable, } catch (Exception e) { LOG.error("Error while closing jmx registrator of {}", identifier, e); } + try { + if (runtimeBeanRegistrator != null) { + runtimeBeanRegistrator.close(); + } + } catch (Exception e) { + LOG.error("Error while closing runtime bean jmx registrator of {}", identifier, e); + } try { osgiRegistration.close(); } catch (Exception e) {