X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fdom%2Fbroker%2Fosgi%2FSchemaServiceActivator.java;h=f893f96d18c59e94df9fe7961b8856b214a6f196;hp=344b3f32763c2fcb9c45047ae7c4e34f0b6e087d;hb=4f84c7cdc09512490d743620eff479b9c69170f2;hpb=962d3eef6f172bc8bd66c242eda3250dbda39284 diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/osgi/SchemaServiceActivator.java b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/osgi/SchemaServiceActivator.java index 344b3f3276..f893f96d18 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/osgi/SchemaServiceActivator.java +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/sal/dom/broker/osgi/SchemaServiceActivator.java @@ -17,20 +17,19 @@ import org.osgi.framework.ServiceRegistration; public class SchemaServiceActivator implements BundleActivator { - + private ServiceRegistration schemaServiceReg; private GlobalBundleScanningSchemaServiceImpl schemaService; @Override - public void start(BundleContext context) throws Exception { - schemaService = new GlobalBundleScanningSchemaServiceImpl(); - schemaService.setContext(context); + public void start(final BundleContext context) { + schemaService = new GlobalBundleScanningSchemaServiceImpl(context); schemaService.start(); schemaServiceReg = context.registerService(SchemaService.class, schemaService, new Hashtable()); } - + @Override - public void stop(BundleContext context) throws Exception { + public void stop(final BundleContext context) throws Exception { schemaServiceReg.unregister(); schemaService.close(); }