// add items to servlet context
servletContext.setAttribute(WebConstants.MODULE_DEFINITION_SOURCE_ATTRIBUTE, moduleDefinitionSource);
servletContext.setAttribute(WebConstants.IMPALA_FACTORY_ATTRIBUTE, facade);
ModuleOperationInput input = new ModuleOperationInput(moduleDefinitionSource, null, null);
ModuleOperation operation = facade.getModuleOperationRegistry().getOperation(ModuleOperationConstants.UpdateRootModuleOperation);
operation.execute(input);
ConfigurableApplicationContext context = SpringModuleUtils.getRootSpringContext(facade.getModuleStateHolder());
if (context == null) {
throw new InvalidStateException("Root application context is null");