// add items to servlet context
servletContext.setAttribute(WebConstants.MODULE_DEFINITION_SOURCE_ATTRIBUTE, moduleDefinitionSource);
servletContext.setAttribute(WebConstants.IMPALA_FACTORY_ATTRIBUTE, facade);
ApplicationManager applicationManager = facade.getApplicationManager();
Application application = applicationManager.getCurrentApplication();
ModuleOperationInput input = new ModuleOperationInput(moduleDefinitionSource, null, null);
ModuleOperation operation = facade.getModuleOperationRegistry().getOperation(ModuleOperationConstants.UpdateRootModuleOperation);
operation.execute(application, input);
ConfigurableApplicationContext context = SpringModuleUtils.getRootSpringContext(application.getModuleStateHolder());
if (context == null) {
logger.warn("Root module context is null: no modules loaded");
}
else if (!(context instanceof WebApplicationContext)) {