Package org.gatein.wci

Examples of org.gatein.wci.ServletContainer.register()


   {
      ServletContainer container = new DefaultServletContainer();
      ServletContainerContextImpl scc = new ServletContainerContextImpl();

      //
      container.register(scc);

      // Assert we got registration
      assertNotNull(scc.registration);

      // Keep a ref on registration
View Full Code Here


      ServletContainer container = new DefaultServletContainer();
      ServletContainerContextImpl scc1 = new ServletContainerContextImpl();
      ServletContainerContextImpl scc2 = new ServletContainerContextImpl();

      // We register
      container.register(scc1);

      // Registration was done
      assertNotNull(scc1.registration);

      // Try register
View Full Code Here

      // Registration was done
      assertNotNull(scc1.registration);

      // Try register
      container.register(scc2);

      // Registration failed
      assertNull(scc2.registration);

      // Cancel
View Full Code Here

      // Cancel
      scc1.registration.cancel();

      // Try register again
      container.register(scc2);

      // Registration should have worked now
      assertNotNull(scc2.registration);
   }
View Full Code Here

      ServletContainer container = new DefaultServletContainer();
      ServletContainerContextImpl scc = new ServletContainerContextImpl();
      WebAppRegistry registry = new WebAppRegistry();

      //
      container.register(scc);

      //
      container.addWebAppListener(registry);

      //
View Full Code Here

      //
      container.addWebAppListener(registry);
      container.addWebAppListener(registry);

      //
      container.register(scc);
      scc.registration.registerWebApp(new WebAppContextImpl("/foo"));
      assertEquals(Tools.toSet("/foo"), registry.getKeys());

      //
      container.addWebAppListener(registry);
View Full Code Here

      ServletContainer container = new DefaultServletContainer();
      ServletContainerContextImpl scc = new ServletContainerContextImpl();
      WebAppRegistry registry = new WebAppRegistry();

      //
      container.register(scc);

      // Add 2 web apps
      scc.registration.registerWebApp(new WebAppContextImpl("/foo"));
      scc.registration.registerWebApp(new WebAppContextImpl("/bar"));
View Full Code Here

   public void testServletContainerThrowsIAE()
   {
      ServletContainer container = new DefaultServletContainer();
      try
      {
         container.register(null);
         fail("Was expecting an IAE");
      }
      catch (IllegalArgumentException ignore)
      {
      }
View Full Code Here

      ServletContainerContextImpl scc = new ServletContainerContextImpl();
      WebAppRegistry registry = new WebAppRegistry();

      //
      final SynchronizedBoolean called = new SynchronizedBoolean(false);
      container.register(scc);
      container.addWebAppListener(registry);
      container.addWebAppListener(new WebAppListener()
      {
         public void onEvent(WebAppEvent event)
         {
View Full Code Here

     ServletContainerContextImpl scc = new ServletContainerContextImpl();
     WebAppRegistry registry = new WebAppRegistry();

     //
     final SynchronizedBoolean called = new SynchronizedBoolean(false);
     container.register(scc);
     container.addWebAppListener(registry);
     container.addWebAppListener(new WebAppListener()
     {
       public void onEvent(WebAppEvent event)
       {
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.