*/
@Override
protected WebApplicationContext createWebApplicationContext(ServletContext servletContext, ApplicationContext parent)
throws BeansException {
ModuleManagementFacade facade = createModuleManagementFacade(servletContext);
// load the parent context, which is web-independent
ModuleDefinitionSource moduleDefinitionSource = getModuleDefinitionSource(servletContext, facade);
// 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) {