/** * Registers a new DefaultModuleDefinition in this registry. Using this module * definition, the registry will be capable of created shared and private * <code>Module</code> instances. */ public synchronized Module add(ModuleDefinition info) throws ResolveError { return add(info, true); }
/** * Registers a new DefaultModuleDefinition in this registry. Using this module * definition, the registry will be capable of created shared and private * <code>Module</code> instances. */ public synchronized Module add(ModuleDefinition info) throws ResolveError { return add(info, true); }
@Override protected synchronized void add(Module newModule) { // It is overridden to make it synchronized as it is called from // BundleListener. super.add(newModule); // don't set cacheInvalidated = true here, as this method is called while iterating initial // set of bundles when this module is started. Instead, we invalidate the cache makeModuleDef(). }
add(newModule);
add(newModule);
/** * Modules can notify their registry that they have changed (classes, * resources,etc...). Registries are requested to take appropriate action * to make the new module available. */ public void changed(Module service) { // house keeping... remove(service); ModuleDefinition info = service.getModuleDefinition(); Module newService = newModule(info); // store it add(newService); }
/** * Modules can notify their registry that they have changed (classes, * resources,etc...). Registries are requested to take appropriate action * to make the new module available. */ public void changed(Module service) { // house keeping... remove(service); ModuleDefinition info = service.getModuleDefinition(); Module newService = newModule(info); // store it add(newService); }
public Module add(ModuleDefinition info, boolean resolve) throws ResolveError { // it may have already been created Module service = makeModuleFor(info.getName(), info.getVersion(), resolve); if (service!=null) { // Utils.getDefaultLogger().info("Service " + info.getName() // + " already registered"); } else { // create the service instance service = newModule(info); if (service != null){ add(service); } } return service; }
public Module add(ModuleDefinition info, boolean resolve) throws ResolveError { // it may have already been created Module service = makeModuleFor(info.getName(), info.getVersion(), resolve); if (service!=null) { // Utils.getDefaultLogger().info("Service " + info.getName() // + " already registered"); } else { // create the service instance service = newModule(info); if (service != null){ add(service); } } return service; }
module = loadFromRepository(name, version); if (module!=null) { add(module);
module = loadFromRepository(name, version); if (module!=null) { add(module);