Package org.gatein.wci

Examples of org.gatein.wci.WebAppLifeCycleEvent


               {
                  log.debug("Web application " + key + " registration");
                  webAppContext.start();
                  WebAppImpl webApp = new WebAppImpl(webAppContext);
                  container.webAppMap.put(key, webApp);
                  container.fireEvent(new WebAppLifeCycleEvent(webApp, WebAppLifeCycleEvent.ADDED));
                  return true;
               }
               catch (Exception e)
               {
                  log.debug("Was not able to start web app context " + key);
View Full Code Here


            {
               webApp = container.webAppMap.remove(webAppId);
               if (webApp != null)
               {
                  log.debug("Web application " + webAppId + " cleanup");
                  container.fireEvent(new WebAppLifeCycleEvent(webApp, WebAppLifeCycleEvent.REMOVED));
                  webApp.context.stop();
                  return true;
               }
               else
               {
View Full Code Here

         synchronized (container.lock)
         {
            // Unregister all web apps
            for (WebApp webApp : container.webAppMap.values())
            {
               WebAppLifeCycleEvent event = new WebAppLifeCycleEvent(webApp, WebAppLifeCycleEvent.REMOVED);
               container.fireEvent(event);
            }

            //
            container.webAppMap.clear();
View Full Code Here

   public void onEvent(WebAppEvent event)
   {
      if (event instanceof WebAppLifeCycleEvent)
      {
         WebAppLifeCycleEvent lifeCycleEvent = (WebAppLifeCycleEvent)event;
         String cp = event.getWebApp().getContextPath();
         switch (lifeCycleEvent.getType())
         {
            case WebAppLifeCycleEvent.ADDED:
               // log.debug("Going to install war file" + cp);
               add(event.getWebApp());
               // log.debug("Installed war file" + cp);
View Full Code Here

        return portletApplicationRegistry;
    }

    public void onEvent(WebAppEvent event) {
        if (event instanceof WebAppLifeCycleEvent) {
            WebAppLifeCycleEvent lifeCycleEvent = (WebAppLifeCycleEvent) event;
            int type = lifeCycleEvent.getType();
            if (type == WebAppLifeCycleEvent.ADDED) {
                try {
                    portletApplicationRegistry.add(lifeCycleEvent.getWebApp().getServletContext());
                } catch (DeploymentException e) {
                    log.error("Portlet deployment failed", e);
                }
            } else if (type == WebAppLifeCycleEvent.REMOVED) {
                portletApplicationRegistry.remove(lifeCycleEvent.getWebApp().getServletContext());
            }
        }
    }
View Full Code Here

        consumerRegistry = null;
    }

    public void onEvent(WebAppEvent event) {
        if (event instanceof WebAppLifeCycleEvent) {
            WebAppLifeCycleEvent lifeCycleEvent = (WebAppLifeCycleEvent) event;
            WebApp webApp = event.getWebApp();
            ServletContext context = webApp.getServletContext();

            // if we see the WSRP admin GUI being deployed or undeployed, inject or remove services
            if (WSRP_ADMIN_GUI_CONTEXT_PATH.equals(webApp.getContextPath())) {
                switch (lifeCycleEvent.getType()) {
                    case WebAppLifeCycleEvent.ADDED:
                        context.setAttribute("ConsumerRegistry", consumerRegistry);
                        context.setAttribute("ProducerConfigurationService", producer.getConfigurationService());
                        break;
                    case WebAppLifeCycleEvent.REMOVED:
View Full Code Here

    }

    @Override
    public void onEvent(WebAppEvent event) {
        if (event instanceof WebAppLifeCycleEvent) {
            WebAppLifeCycleEvent lifeCycleEvent = (WebAppLifeCycleEvent) event;
            int type = lifeCycleEvent.getType();
            if (type == WebAppLifeCycleEvent.ADDED) {
                try {
                    portletApplicationRegistry.add(lifeCycleEvent.getWebApp().getServletContext());
                } catch (DeploymentException e) {
                    // Portlet deployment failed
                    e.printStackTrace();
                }
            } else if (type == WebAppLifeCycleEvent.REMOVED) {
                portletApplicationRegistry.remove(lifeCycleEvent.getWebApp().getServletContext());
            }
        }
    }
View Full Code Here

        this.portalContainerName = portalContainerName;
    }

    public void onEvent(final WebAppEvent event) {
        if (event instanceof WebAppLifeCycleEvent) {
            WebAppLifeCycleEvent waEvent = (WebAppLifeCycleEvent) event;
            if (waEvent.getType() == WebAppLifeCycleEvent.ADDED) {
                ServletContext scontext = null;
                InputStream is = null;
                try {
                    scontext = event.getWebApp().getServletContext();
                    is = scontext.getResourceAsStream(GATEIN_CONFIG_RESOURCE);
View Full Code Here

        this.portalContainerName = portalContainerName;
    }

    public void onEvent(WebAppEvent event) {
        if (event instanceof WebAppLifeCycleEvent) {
            WebAppLifeCycleEvent lifeCycleEvent = (WebAppLifeCycleEvent) event;
            ServletContext servletContext = lifeCycleEvent.getWebApp().getServletContext();
            switch (lifeCycleEvent.getType()) {
                case WebAppLifeCycleEvent.ADDED:
                    add(event.getWebApp());
                    break;
                case WebAppLifeCycleEvent.REMOVED:
                    remove(event.getWebApp());
View Full Code Here

    }

    public void onEvent(WebAppEvent event) {
        // TODO Auto-generated method stub
        if (event instanceof WebAppLifeCycleEvent) {
            WebAppLifeCycleEvent waEvent = (WebAppLifeCycleEvent) event;
            if (waEvent.getType() == WebAppLifeCycleEvent.REMOVED) {
                String webApp = event.getWebApp().getServletContext().getContextPath();
                removeWebAppSkin(webApp);
                removeContextAppSkin(event.getWebApp());
            }
        }
View Full Code Here

TOP

Related Classes of org.gatein.wci.WebAppLifeCycleEvent

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.