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=113a9c08dbe064f2d8d2066ee94dd8a1e0952505;hp=344b3f32763c2fcb9c45047ae7c4e34f0b6e087d;hb=1f6daaf007e78df276604baa4c515a50037a649d;hpb=405ea7ce68d22bd3d2501857c5253793b581b086 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..113a9c08db 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 = GlobalBundleScanningSchemaServiceImpl.createInstance(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(); }