Examples of ModuleManagementFacade


Examples of org.impalaframework.facade.ModuleManagementFacade

    }

    @Override
    protected WebApplicationContext initWebApplicationContext() throws BeansException {
       
        ModuleManagementFacade moduleManagementFacade = ImpalaServletUtils.getModuleManagementFacade(getServletContext());
        FrameworkLockHolder frameworkLockHolder = moduleManagementFacade.getFrameworkLockHolder();
       
        try {
            frameworkLockHolder.writeLock();
            WebApplicationContext wac = createWebApplicationContext();
            HttpServlet delegateServlet = this;
View Full Code Here

Examples of org.impalaframework.facade.ModuleManagementFacade

        super();
    }

    public void init(FilterConfig filterConfig) throws ServletException {
        this.filterConfig = filterConfig;
        ModuleManagementFacade moduleManagementFacade = ImpalaServletUtils.getModuleManagementFacade(filterConfig.getServletContext());
        this.frameworkLockHolder = moduleManagementFacade.getFrameworkLockHolder();
    }
View Full Code Here

Examples of org.impalaframework.facade.ModuleManagementFacade

    }

    protected Filter getDelegateFilter(ServletRequest request) {
        ServletContext servletContext = getServletContext();

        ModuleManagementFacade moduleManagementFacade = ImpalaServletUtils.getModuleManagementFacade(servletContext);
        WebAttributeQualifier qualifier = getWebAttributeQualifier(moduleManagementFacade);
        String applicationId = getApplicationId(moduleManagementFacade);
       
        String attributeName = qualifier.getQualifiedAttributeName(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, applicationId, targetModuleName);
       
View Full Code Here

Examples of org.impalaframework.facade.ModuleManagementFacade

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

Examples of org.impalaframework.facade.ModuleManagementFacade

    @Override
    public void closeWebApplicationContext(ServletContext servletContext) {

        try {
            // the superclass closes the modules
            ModuleManagementFacade facade = WebServletUtils.getModuleManagementFacade(servletContext);
   
            if (facade != null) {
   
                servletContext.log("Closing modules and root application context hierarchy");
   
                facade.getApplicationManager().close();
   
                // now close the bootstrap factory
                facade.close();
            }       
        } finally {
            super.closeWebApplicationContext(servletContext);
        }
    }
View Full Code Here

Examples of org.impalaframework.facade.ModuleManagementFacade

           
            if (logger.isDebugEnabled()) {
                logger.debug("Session module protection turned on for session wrapping");
            }
           
            ModuleManagementFacade moduleManagementFacade = WebServletUtils.getModuleManagementFacade(servletContext);
            if (moduleManagementFacade != null) {
               
                Application application = moduleManagementFacade.getApplicationManager().getApplication(applicationId);
                RuntimeModule currentModuleContext = application.getModuleStateHolder().getModule(moduleName);
               
                if (currentModuleContext != null) {
                    return new StateProtectingHttpSession(session, webAttributeQualifier, applicationId, moduleName, currentModuleContext.getClassLoader());
                } else {
View Full Code Here

Examples of org.impalaframework.facade.ModuleManagementFacade

  public WebApplicationContext createWebApplicationContext() throws BeansException {

    // the superclass closes the modules
    final ServletContext servletContext = servlet.getServletContext();
    ModuleManagementFacade facade = ImpalaServletUtils.getModuleManagementFacade(servletContext);

    final String servletName = servlet.getServletName();
    Application application = facade.getApplicationManager().getCurrentApplication();
        ModuleStateHolder moduleStateHolder = application.getModuleStateHolder();
   
    if (!initialized) {
     
      ModuleStateChangeNotifier moduleStateChangeNotifier = facade.getModuleStateChangeNotifier();
      ModuleStateChangeListener listener = newModuleStateChangeListener(servletName);
            moduleStateChangeNotifier.addListener(listener);
      this.initialized = true;
    }
   
View Full Code Here

Examples of org.impalaframework.facade.ModuleManagementFacade

    public String unloadModules() {
       
        try {
      Assert.notNull(servletContext);

      ModuleManagementFacade facade = getFacade();
      ModuleDefinitionSource source = getSource();
      Application application = getApplication(facade);

      ModuleOperationInput moduleOperationInput = new ModuleOperationInput(source, null, null);
     
      ModuleOperation operation = facade.getModuleOperationRegistry().getOperation(ModuleOperationConstants.CloseRootModuleOperation);
      operation.execute(application, moduleOperationInput);
     
      return "Successfully unloaded modules";
        }
        catch (Throwable e) {
View Full Code Here

Examples of org.impalaframework.facade.ModuleManagementFacade

    }

  String doReloadModules() {
    Assert.notNull(servletContext);

    ModuleManagementFacade facade = getFacade();
    ModuleDefinitionSource source = getSource();
    Application application = getApplication(facade);

    ModuleOperationInput moduleOperationInput = new ModuleOperationInput(source, null, null);
   
    ModuleOperation operation = facade.getModuleOperationRegistry().getOperation(ModuleOperationConstants.ReloadRootModuleOperation);
    operation.execute(application, moduleOperationInput);
   
    return "Successfully reloaded module definition";
  }
View Full Code Here

Examples of org.impalaframework.facade.ModuleManagementFacade

        Application application = applicationManager.getCurrentApplication();
        return application;
    }
   
    private ModuleManagementFacade getFacade() {
        ModuleManagementFacade facade = (ModuleManagementFacade) servletContext
                .getAttribute(WebConstants.IMPALA_FACTORY_ATTRIBUTE);
        if (facade == null) {
            throw new ConfigurationException(
                    "No instance of "
                            + ModuleManagementFacade.class.getName()
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.