- osgiRegistration = beanToOsgiServiceManager.registerToOsgi(module.getClass(),
- newReadableConfigBean.getInstance(), entry.getName());
+ ModuleFactory moduleFactory = entry.getModuleFactory();
+ if(moduleFactory != null) {
+ BundleContext bc = configTransactionController.
+ getModuleFactoryBundleContext(moduleFactory.getImplementationName());
+ osgiRegistration = beanToOsgiServiceManager.registerToOsgi(module.getClass(),
+ newReadableConfigBean.getInstance(), entry.getName(), bc);
+ } else {
+ throw new NullPointerException(entry.getIdentifier().getFactoryName() + " ModuleFactory not found.");
+ }
+