protected ConfigurableApplicationContext initImpalaApplicationContext(
ServletContext servletContext,
final WebApplicationContext superContext) {
ModuleManagementFacade facade = createModuleManagementFacade(servletContext, superContext);
// 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) {