Package org.gatein.wci

Examples of org.gatein.wci.ServletContainer$RegistrationImpl


    }

    public void stop() {
        if (!bypass) {
            // stop listening to web app events
            ServletContainer servletContainer = ServletContainerFactory.getServletContainer();
            servletContainer.removeWebAppListener(this);

            stopProducer();
            stopConsumers();
        }
    }
View Full Code Here


                startProducer();
                startConsumers();

                // listen for web app events so that we can inject services into WSRP admin UI "cleanly"
                // todo: this service injection should really be done using CDI... :/
                ServletContainer servletContainer = ServletContainerFactory.getServletContainer();
                servletContainer.addWebAppListener(this);

                log.info("WSRP Service version '" + WSRPConstants.WSRP_SERVICE_VERSION + "' STARTED");
            } catch (Exception e) {
                log.error("WSRP Service version '" + WSRPConstants.WSRP_SERVICE_VERSION + "' FAILED to start", e);
            }
View Full Code Here

     * Stops the component if the event is related to the main portal context.
     */
    public void stop() {
        if (!bypass) {
            // stop listening to web app events
            ServletContainer servletContainer = ServletContainerFactory.getServletContainer();
            servletContainer.removeWebAppListener(this);
        }
    }
View Full Code Here

        //
        int status;
        if (req.getRemoteUser() == null) {
            if (username != null && password != null) {
                Credentials credentials = new Credentials(username, password);
                ServletContainer container = ServletContainerFactory.getServletContainer();

                // This will login or send an AuthenticationException
                try {
                    container.login(req, resp, credentials);
                } catch (AuthenticationException e) {
                    log.debug("User authentication failed");
                    if (log.isTraceEnabled()) {
                        log.trace(e.getMessage(), e);
                    }
View Full Code Here

        //
        int status;
        if (req.getRemoteUser() == null) {
            if (username != null && password != null) {
                Credentials credentials = new Credentials(username, password);
                ServletContainer container = ServletContainerFactory.getServletContainer();

                // This will login or send an AuthenticationException
                try {
                    container.login(req, resp, credentials);
                } catch (AuthenticationException e) {
                    log.debug("User authentication failed");
                    if (log.isTraceEnabled()) {
                        log.trace(e.getMessage(), e);
                    }
View Full Code Here

                ExoContainer container = getContainer();
                CookieTokenService tokenservice = (CookieTokenService) container
                        .getComponentInstanceOfType(CookieTokenService.class);
                Credentials credentials = tokenservice.validateToken(token, false);
                if (credentials != null) {
                    ServletContainer servletContainer = ServletContainerFactory.getServletContainer();
                    try {
                        servletContainer.login(req, resp, credentials);
                    } catch (Exception e) {
                        // Could not authenticate
                    }
                }
            }
View Full Code Here

   {
      PortletContainer container = (PortletContainer)invocation.getAttribute(ContainerPortletInvoker.PORTLET_CONTAINER);
      PortletApplication portletApplication = container.getPortletApplication();
      ServerContext reqCtx = invocation.getServerContext();
      ServletContext targetCtx = portletApplication.getContext().getServletContext();
      ServletContainer servletContainer = servletContainerFactory.getServletContainer();
      try
      {
         return (PortletInvocationResponse)reqCtx.dispatch(servletContainer, targetCtx, callback, invocation);
      }
      catch (Exception e)
View Full Code Here

   @Test
   @InSequence(0)
   public void testBefore()
   {
      ServletContainer _container = ServletContainerFactory.getServletContainer();
      Assert.assertNotNull(_container);

      //
      WebAppRegistry _registry = new WebAppRegistry();
      _container.addWebAppListener(_registry);
      HashSet<String> _keys = new HashSet<String>(_registry.getKeys());

      //
      registry = _registry;
      keys = _keys;
View Full Code Here

TOP

Related Classes of org.gatein.wci.ServletContainer$RegistrationImpl

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.