+ " as no attribute '" + WebConstants.IMPALA_FACTORY_ATTRIBUTE
+ "' has been set up. Have you set up your Impala ContextLoader correctly?");
}
String servletName = getServletName();
ModuleStateHolder moduleStateHolder = factory.getModuleStateHolder();
if (!initialized) {
ModuleStateChangeNotifier moduleStateChangeNotifier = factory.getModuleStateChangeNotifier();
moduleStateChangeNotifier.addListener(new ModuleStateChangeListener() {
public void moduleStateChanged(ModuleStateHolder moduleStateHolder, ModuleStateChange change) {
try {
initServletBean();
}
catch (Exception e) {
logger.error("Unable to reinitialize servlet " + getServletName(), e);
}
}
public String getModuleName() {
return getServletName();
}
public Transition getTransition() {
return Transition.UNLOADED_TO_LOADED;
}
});
this.initialized = true;
}
ConfigurableApplicationContext context = moduleStateHolder.getModule(servletName);
if (context != null) {
if (context instanceof WebApplicationContext) {
return (WebApplicationContext) context;
}
else {