Package org.jboss.arquillian.impl.core.spi.context

Examples of org.jboss.arquillian.impl.core.spi.context.ContainerContext


        
         Assert.assertNotNull(
               "Verify instance was bound to context",
               context.getObjectStore().get(Object.class));
        
         ContainerContext containerContext = manager.getContext(ContainerContext.class);
         Assert.assertFalse(containerContext.isActive());
        
         containerContext.activate("");
         try
         {
            Assert.assertNotNull(
                  "Should have set a Double in container scope",
                  containerContext.getObjectStore().get(Double.class));
         }
         finally
         {
            containerContext.deactivate();
            containerContext.destroy("");
         }
      }
      finally
      {
         context.deactivate();
View Full Code Here


    * Activate ContainerContext on all Container Events
    *
    */
   public void createContainerContext(@Observes EventContext<ContainerControlEvent> context)
   {
      ContainerContext containerContext = this.containerContext.get();
      ContainerControlEvent event = context.getEvent();

      try
      {
         containerContext.activate(event.getContainerName());
         ThreadContext.set(event.getContainer().getClassLoader());

         context.proceed();
      }
      finally
      {
         ThreadContext.reset();
         containerContext.deactivate();
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.impl.core.spi.context.ContainerContext

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.