@Override
protected WebApplicationContext initWebApplicationContext() throws BeansException {
ModuleManagementFacade moduleManagementFacade = ImpalaServletUtils.getModuleManagementFacade(getServletContext());
FrameworkLockHolder frameworkLockHolder = moduleManagementFacade.getFrameworkLockHolder();
try {
frameworkLockHolder.writeLock();
WebApplicationContext wac = createWebApplicationContext();
HttpServlet delegateServlet = this;
this.invoker = getInvoker(wac, delegateServlet, frameworkLockHolder, this.setThreadContextClassLoader);
//FIXME this probably shouldn't automatically be being called. How to stop it from being called inappropriately
//However, it must be called
onRefresh(wac);
ImpalaServletUtils.publishWebApplicationContext(wac, this);
return wac;
}
finally {
frameworkLockHolder.writeUnlock();
}
}