org.jboss.arquillian.openwebbeans
Class OpenWebBeansSEContainer

java.lang.Object
  extended by org.jboss.arquillian.openwebbeans.OpenWebBeansSEContainer
All Implemented Interfaces:
DeployableContainer

public class OpenWebBeansSEContainer
extends Object
implements DeployableContainer

An embedded Arquillian container for OpenWebBeans

This DeployableContainer implementation provides an embedded container that bootstraps the OpenWebBeans JSR-299 implementation in SE (or standalone) mode. It's akin to the Weld embedded container.

The OpenWebBeans container is started in the deploy() method and shutdown in the undeploy() method. The container is controlled using the StandaloneLifeCycle from OpenWebBeans. The default discovery service (metadata scanner) is replaced by a discovery service that is adapted to load /META-INF/beans.xml resources and managed bean classes from a ShrinkWrap archive.

The current thread's context ClassLoader is also replaced with a ClassLoader implementation that can discover resources in a ShrinkWrap archive.

Version:
$Revision: $
Author:
Dan Allen, Aslak Knutsen
See Also:
WeldSEContainer

Nested Class Summary
static class OpenWebBeansSEContainer.ContainerInstanceHolder
           
 
Field Summary
static ThreadLocal<OpenWebBeansSEContainer.ContainerInstanceHolder> CONTAINER_INSTANCE_HOLDER
           
 
Constructor Summary
OpenWebBeansSEContainer()
           
 
Method Summary
 ContainerMethodExecutor deploy(Context context, org.jboss.shrinkwrap.api.Archive<?> archive)
           
 void setup(Context context, Configuration configuration)
           
 void start(Context context)
           
 void stop(Context context)
           
 void undeploy(Context context, org.jboss.shrinkwrap.api.Archive<?> archive)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTAINER_INSTANCE_HOLDER

public static final ThreadLocal<OpenWebBeansSEContainer.ContainerInstanceHolder> CONTAINER_INSTANCE_HOLDER
Constructor Detail

OpenWebBeansSEContainer

public OpenWebBeansSEContainer()
Method Detail

setup

public void setup(Context context,
                  Configuration configuration)
Specified by:
setup in interface DeployableContainer

start

public void start(Context context)
           throws LifecycleException
Specified by:
start in interface DeployableContainer
Throws:
LifecycleException
See Also:
org.jboss.arquillian.spi.DeployableContainer#start()

stop

public void stop(Context context)
          throws LifecycleException
Specified by:
stop in interface DeployableContainer
Throws:
LifecycleException
See Also:
org.jboss.arquillian.spi.DeployableContainer#stop()

deploy

public ContainerMethodExecutor deploy(Context context,
                                      org.jboss.shrinkwrap.api.Archive<?> archive)
                               throws DeploymentException
Specified by:
deploy in interface DeployableContainer
Throws:
DeploymentException
See Also:
org.jboss.arquillian.spi.DeployableContainer#deploy(org.jboss.shrinkwrap.api.Archive)

undeploy

public void undeploy(Context context,
                     org.jboss.shrinkwrap.api.Archive<?> archive)
              throws DeploymentException
Specified by:
undeploy in interface DeployableContainer
Throws:
DeploymentException
See Also:
org.jboss.arquillian.spi.DeployableContainer#undeploy(org.jboss.shrinkwrap.api.Archive)


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.