//TODO introduce constants for bean names
ModuleManagementFacade facade = ObjectUtils.cast(applicationContext.getBean("moduleManagementFacade"),
ModuleManagementFacade.class);
if (facade == null) {
throw new InvalidStateException("Application context '" + applicationContext.getDisplayName()
+ "' does not contain bean named 'moduleManagementFacade'");
}
setNewOperationsFacade(facade);
bundleContext.registerService(OperationsFacade.class.getName(), operations, null);