- public Module createModule(String instanceName, DependencyResolver dependencyResolver, BundleContext bundleContext) {
- throw new UnsupportedOperationException("Only default instance supported.");
+ public SchemaServiceImplSingletonModule instantiateModule(String instanceName, DependencyResolver dependencyResolver, SchemaServiceImplSingletonModule oldModule, AutoCloseable oldInstance, BundleContext bundleContext) {
+ checkArgument(SINGLETON_NAME.equals(instanceName),"Illegal instance name '" + instanceName + "', only allowed name is " + SINGLETON_NAME);
+ SchemaServiceImplSingletonModule module = super.instantiateModule(instanceName, dependencyResolver, oldModule, oldInstance, bundleContext);
+ // FIXME bundle context should not be passed around
+ module.setBundleContext(bundleContext);
+ return module;