Package org.impalaframework.module.holder

Examples of org.impalaframework.module.holder.ModuleStateHolder


          + " 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 {
View Full Code Here

TOP

Related Classes of org.impalaframework.module.holder.ModuleStateHolder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.