JBoss.orgCommunity Documentation
A DeployableContainer implementation that can connect and run against a remote(different JVM, different machine) running JBoss AS 5 instance. This implementation has no lifecycle support, so it can not be started or stopped.
Table 12.1. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
Default Protocol: Servlet 2.5
Table 12.2. Container Configuration Options
Name | Type | Default | Description |
---|---|---|---|
profileName | String | default | ProfileService profileKey. Used to load the correct profile into the DeploymentManager. |
providerUrl | String | jnp://localhost:1099 | The JNDI connection URL. |
urlPkgPrefix | String | org.jboss.naming:org.jnp.interfaces | The JNDI package prefix. |
contextFactory | String | org.jnp.interfaces.NamingContextFactory | JNDI Context factory class name. |
Example of Maven profile setup
<profile>
<id>jbossas-remote-5</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-jbossas-remote-5</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-client</artifactId>
<version>5.0.1.GA</version>
<type>pom</type>
</dependency>
</dependencies>
</profile>
A DeployableContainer implementation that can connect and run against a remote(different JVM, different machine) running JBoss AS 5.1 instance. This implementation has no lifecycle support, so it can not be started or stopped.
Table 12.3. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
Default Protocol: Servlet 2.5
Table 12.4. Container Configuration Options
Name | Type | Default | Description |
---|---|---|---|
profileName | String | default | ProfileService profileKey. Used to load the correct profile into the DeploymentManager. |
providerUrl | String | jnp://localhost:1099 | The JNDI connection URL. |
urlPkgPrefix | String | org.jboss.naming:org.jnp.interfaces | The JNDI package prefix. |
contextFactory | String | org.jnp.interfaces.NamingContextFactory | JNDI Context factory class name. |
Example of Maven profile setup
<profile>
<id>jbossas-remote-5.1</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-jbossas-remote-5.1</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-client</artifactId>
<version>5.1.0.GA</version>
<type>pom</type>
</dependency>
</dependencies>
</profile>
A DeployableContainer implementation that can run and connect to a remote(different JVM, same machine) JBoss AS 5.1 instance. This implementation has lifecycle support, so the container will be started and stopped as part of the test run.
Table 12.5. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
Default Protocol: Servlet 2.5
Table 12.6. Container Configuration Options
Name | Type | Default | Description |
---|---|---|---|
profileName | String | default | ProfileService profileKey. Used to load the correct profile into the DeploymentManager. |
bindAddress | String | localhost | The Address the server should bind to. |
httpPort | int | 8080 | Used by the ServerManager to communicate with the server. |
rmiPort | int | 1099 | Used by the ServerManager to communicate with the server. |
jbossHome | String | $JBOSS_HOME | The JBoss configuration to start. |
javaHome | String | $JAVA_HOME | The Java runtime to use to start the server. |
javaVmArguments | String | -Xmx512m -XX:MaxPermSize=128m | JVM arguments used to start the server. |
useRmiPortForAliveCheck | boolean | false | If the ServerManager should use the RMI port when checking if the server is up. |
startupTimeoutInSeconds | int | 120 | Time to way before throwing Exception on server startup. |
shutdownTimeoutInSeconds | int | 45 | Time to way before throwing Exception on server shutdown. |
Example of Maven profile setup
<profile>
<id>jbossas-managed-5.1</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-jbossas-managed-5.1</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-server-manager</artifactId>
<version>1.0.3.GA</version>
</dependency>
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-client</artifactId>
<version>5.1.0.GA</version>
<type>pom</type>
</dependency>
</dependencies>
</profile>
A DeployableContainer implementation that can connect and run against a remote(different JVM, different machine) running JBoss AS 6.0 instance. This implementation has no lifecycle support, so it can not be started or stopped.
Table 12.7. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
![]() |
![]() |
Default Protocol: Servlet 3.0
Table 12.8. Container Configuration Options
Name | Type | Default | Description |
---|---|---|---|
profileName | String | default | ProfileService profileKey. Used to load the correct profile into the DeploymentManager. |
providerUrl | String | jnp://localhost:1099 | The JNDI connection URL. |
urlPkgPrefix | String | org.jboss.naming:org.jnp.interfaces | The JNDI package prefix. |
contextFactory | String | org.jnp.interfaces.NamingContextFactory | JNDI Context factory class name. |
Example of Maven profile setup
<profile>
<id>jbossas-remote-6</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-jbossas-remote-6</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-client</artifactId>
<version>6.0.0.Final</version>
<type>pom</type>
</dependency>
</dependencies>
</profile>
A DeployableContainer implementation that can run and connect to a remote(different JVM, same machine) JBoss AS 6.0 instance. This implementation has lifecycle support, so the container will be started and stopped as part of the test run.
Table 12.9. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
![]() |
![]() |
Default Protocol: Servlet 3.0
Table 12.10. Container Configuration Options
Name | Type | Default | Description |
---|---|---|---|
profileName | String | default | ProfileService profileKey. Used to load the correct profile into the DeploymentManager. |
bindAddress | String | localhost | The Address the server should bind to. |
httpPort | int | 8080 | Used by Servlet Protocol to connect to the server. |
rmiPort | int | 1099 | Used by the ServerManager to communicate with the server. |
jbossHome | String | $JBOSS_HOME | The JBoss configuration to start. |
javaHome | String | $JAVA_HOME | The Java runtime to use to start the server. |
javaVmArguments | String | -Xmx512m -XX:MaxPermSize=128m | JVM arguments used to start the server. |
useRmiPortForAliveCheck | boolean | false | If the ServerManager should use the RMI port when checking if the server is up. |
startupTimeoutInSeconds | int | 120 | Time to way before throwing Exception on server startup. |
shutdownTimeoutInSeconds | int | 45 | Time to way before throwing Exception on server shutdown. |
Example of Maven profile setup
<profile>
<id>jbossas-managed-6</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-jbossas-managed-6</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-server-manager</artifactId>
<version>1.0.3.GA</version>
</dependency>
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-client</artifactId>
<version>6.0.0.Final</version>
<type>pom</type>
</dependency>
</dependencies>
</profile>
A DeployableContainer implementation that can run and connect to a embedded(same JVM) JBoss AS 6.0 instance. This implementation has lifecycle support, so the container will be started and stopped as part of the test run.
Table 12.11. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
![]() |
![]() |
Default Protocol: Servlet 3.0
Table 12.12. Container Configuration Options
Name | Type | Default | Description |
---|---|---|---|
profileName | String | default | ProfileService profileKey. Used to load the correct profile into the DeploymentManager. |
bindAddress | String | localhost | The Address the server should bind to. |
Example of Maven profile setup
<profile>
<id>jbossas-embedded-6</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-jbossas-embedded-6</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-depchain</artifactId>
<version>6.0.0.Final</version>
<type>pom</type>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-depchain</artifactId>
<version>6.0.0.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<additionalClasspathElements>
<additionalClasspathElement>${env.JBOSS_HOME}/client/jbossws-native-client.jar</additionalClasspathElement>
<!--
Because jbossweb.sar contains shared web.xml, which must be
visible from same CL as TomcatDeployer.class.getClassLoader
-->
<additionalClasspathElement>${env.JBOSS_HOME}/server/default/deploy/jbossweb.sar</additionalClasspathElement>
</additionalClasspathElements>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<trimStackTrace>false</trimStackTrace>
<printSummary>true</printSummary>
<forkMode>once</forkMode>
<!--
MaxPermSize Required to bump the space for relective data like
classes, methods, etc. EMB-41. Endorsed required for things like
WS support (EMB-61)
-->
<argLine>-Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Djava.endorsed.dirs=${env.JBOSS_HOME}/lib/endorsed -Djboss.home=${env.JBOSS_HOME} -Djboss.boot.server.log.dir=${env.JBOSS_HOME}</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
A DeployableContainer implementation that can run and connect to a embedded(same JVM) JBoss Reloaded(MicroContainer + VirtualDeploymentFramework) instance. This implementation has lifecycle support, so the container will be started and stopped as part of the test run.
Table 12.13. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
A DeployableContainer implementation that can run and connect to a embedded(same JVM) GlassFish 3.1 instance. This implementation has lifecycle support, so the container will be started and stopped as part of the test run.
Table 12.15. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
![]() |
![]() |
Default Protocol: Servlet 3.0
Table 12.16. Container Configuration Options
Name | Type | Default | Description |
---|---|---|---|
bindHttpPort | int | 8181 | The HTTP port the server should bind to. |
instanceRoot | String | The instanceRoot to use for booting the server. If it does not exist, a default structure will be created. | |
installRoot | String | The installRoot to use for booting the server. If it does not exist, a default structure will be created. | |
configurationXml | String | The relative or absolute path to the domain.xml file that will be used to configure the instance. If absent, the default domain.xml configuration will be used. | |
configurationReadOnly | boolean | false | If true deployment changes are not written to the configuration and persisted. |
sunResourcesXml | String | The relative or absolute path to the sun-resources.xml file that will be used to add resources to the instance using the add-resources asadmin command. |
Example of Maven profile setup
<profile>
<id>glassfish-embedded-3.1</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-glassfish-embedded-3</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.glassfish.extras</groupId>
<artifactId>glassfish-embedded-all</artifactId>
<version>3.1</version>
</dependency>
</dependencies>
</profile>
A DeployableContainer implementation that connects to a remote GlassFish 3.1 instance and deploys the test archive using the admin REST api.
Table 12.17. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
Default Protocol: Servlet 3.0
Table 12.18. Container Configuration Options
Name | Type | Default | Description |
---|---|---|---|
remoteServerAdminPort | int | 4848 | The administrative port the client should connect to. |
remoteServerAddress | String | localhost | The administrative address the client should connect to. |
remoteServerAdminHttps | boolean | false | Use SSL for communicating with the admin server. |
remoteServerHttps | boolean | false | Use SSL to communicate with application. |
remoteServerHttpPort | int | 8080 | The HTTP port of the remote server. |
Example of Maven profile setup
<profile>
<id>glassfish-remote-3.1</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-glassfish-remote-3</artifactId>
<version>1.0.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
A DeployableContainer implementation that manages the complete lifecycle of an embedded (same JVM) Tomcat 6 Servlet Container. (Keep in mind that only select EE APIs are available in Tomcat 6, such as JNDI and Servlet 2.5). Test archives are adapted to Tomcat's StandardContext API by ShrinkWrap and deployed programmatically.
Table 12.19. Container Injection Support Matrix
@Resource | @EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|---|
![]() |
![]() |
<?xml version="1.0" encoding="UTF-8"?> <arquillian xmlns="http://jboss.com/arquillian" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tomcat6="urn:arq:org.jboss.arquillian.container.tomcat.embedded_6"> <tomcat6:container> <!-- unpackArchive must be true if using the Weld Servlet module --> <tomcat6:unpackArchive>true</tomcat6:unpackArchive> </tomcat6:container> </arquillian>
Running an in-container test on Tomcat 6 currently requires that you add the Arquillian Protocol Servlet to the test archive's web.xml, a temporary measure until ARQ-217 is resolved. The listing below shows a minimum web.xml containing the required Servlet mapping:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<servlet>
<servlet-name>ServletTestRunner</servlet-name>
<servlet-class>org.jboss.arquillian.protocol.servlet_3.ServletTestRunner</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ServletTestRunner</servlet-name>
<url-pattern>/ArquillianServletRunner</url-pattern>
</servlet-mapping>
</web-app>
If you forget to add this Servlet mapping for a test using the in-container run mode, you will get a failure with the message "Kept getting 404s" because Arquillian can't communicate with the deployed application.
Default Protocol: Servlet 2.5
Table 12.20. Container Configuration Options
Name | Type | Default | Description |
---|---|---|---|
bindHttpPort | int | 9090 | The HTTP port the server should bind to. |
bindAddress | String | localhost | The host the server should be run on. |
tomcatHome | String | Optional location of a Tomcat installation to link against. | |
serverName | String | Optional name of the server | |
appBase | String | Optional relative or absolute path to the directory where applications are deployed (e.g., webapps). | |
workDir | String | Optional relative or absolute path to the directory where applications are expanded and session serialization data is stored (e.g., work). | |
unpackArchive | boolean | true | Specify if the deployment should be deployed exploded or compressed. |
Example of Maven profile setup
<profile>
<id>tomcat-embedded</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-tomcat-embedded-6</artifactId>
<version>1.0.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>catalina</artifactId>
<version>6.0.29</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>coyote</artifactId>
<version>6.0.29</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>jasper</artifactId>
<version>6.0.29</version>
<scope>provided</scope>
</dependency>
<!-- Weld servlet, EL and JSP required for testing CDI injections -->
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet</artifactId>
<version>1.0.1-Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>el-impl</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
A DeployableContainer implementation that can run and connect to a embedded (same JVM) Jetty 6.1 Servlet Container. The minimum recommended version is Jetty 6.1.12, though you can use an earlier 6.1 version if you aren't using JNDI resources. Only select EE APIs are available, such as JNDI and Servlet 2.5. This implementation has lifecycle support, so the container will be started and stopped as part of the test run.
Table 12.21. Container Injection Support Matrix
@Resource | @EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|---|
![]() |
![]() |
Default Protocol: Servlet 2.5
Table 12.22. Container Configuration Options
Name | Type | Default | Description |
---|---|---|---|
bindHttpPort | int | 9090 | The HTTP port the server should bind to. |
bindAddress | String | localhost | The host the server should be run on. |
jettyPlus | boolean | true | Activates the Jetty plus configuration to support JNDI resources (requires jetty-plus and jetty-naming artifacts on the classpath). |
configurationClasses | String | null | Specify your own Jetty configuration classes as a comma separated list. |
Example of Maven profile setup
<profile>
<id>jetty-embedded</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-jetty-embedded-6.1</artifactId>
<version>1.0.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<version>6.1.12</version>
<scope>test</scope>
</dependency>
<!-- plus and naming requires for using JNDI -->
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-plus</artifactId>
<version>6.1.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-naming</artifactId>
<version>6.1.12</version>
<scope>test</scope>
</dependency>
<!-- Weld servlet, EL and JSP required for testing CDI injections -->
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet</artifactId>
<version>1.0.1-Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>el-impl</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
A DeployableContainer implementation that can run and connect to a embedded (same JVM) Jetty 7 Servlet Container. Only select EE APIs are available, such as JNDI and parts of Servlet (support for web-fragement.xml is the important bit). This implementation has lifecycle support, so the container will be started and stopped as part of the test run.
Table 12.23. Container Injection Support Matrix
@Resource | @EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|---|
![]() |
![]() |
Default Protocol: Servlet 3.0
Table 12.24. Container Configuration Options
Name | Type | Default | Description |
---|---|---|---|
bindHttpPort | int | 9090 | The HTTP port the server should bind to. |
bindAddress | String | localhost | The host the server should be run on. |
jettyPlus | boolean | true | Activates the Jetty plus configuration to support JNDI resources (requires jetty-plus and jetty-naming artifacts on the classpath). |
configurationClasses | String | null | Specify your own Jetty configuration classes as a comma separated list. |
Example of Maven profile setup
<profile>
<id>jetty-embedded</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-jetty-embedded-7</artifactId>
<version>1.0.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
<version>7.0.2.v20100331</version>
<scope>test</scope>
</dependency>
<!-- plus and naming requires for using JNDI -->
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-plus</artifactId>
<version>7.0.2.v20100331</version>
<scope>test</scope>
</dependency>
<!-- Weld servlet, EL and JSP required for testing CDI injections -->
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet</artifactId>
<version>1.0.1-Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>el-impl</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
A DeployableContainer implementation that can run and connect to a embedded(same JVM) Weld(CDI reference implementation) SE edition. No EE APIs are available. This implementation has lifecycle support, so the container will be started and stopped as part of the test run.
Table 12.25. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
![]() |
![]() |
Default Protocol: Local
Example of Maven profile setup
<profile>
<id>weld-se-embedded-1</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-weld-se-embedded-1</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core-bom</artifactId>
<version>1.0.1-SP1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</profile>
A DeployableContainer implementation that can run and connect to a embedded(same JVM) Weld(CDI reference implementation) SE edition. No EE APIs are available. This implementation has lifecycle support, so the container will be started and stopped as part of the test run.
Table 12.27. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
![]() |
![]() |
Default Protocol: Local
Example of Maven profile setup
<profile>
<id>weld-se-embedded-11</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-weld-se-embedded-1</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core-bom</artifactId>
<version>1.1.0.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</profile>
A DeployableContainer implementation that can run and connect to a embedded(same JVM) Weld(CDI reference implementation) EE version. Mock EE APIs are available. This implementation has lifecycle support, so the container will be started and stopped as part of the test run.
Table 12.29. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
![]() |
![]() |
Default Protocol: Local
Table 12.30. Container Configuration Options
Name | Type | Default | Description |
---|---|---|---|
enableConversationScope | boolean | false | Activate ConversationScope between @Test methods. Use this to simulate Weld Servlet HTTP Conversation scope support. |
Example of Maven profile setup
<profile>
<id>weld-ee-embedded-1.1</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-weld-ee-embedded-1.1</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core-bom</artifactId>
<version>1.1.0.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</profile>
To run Weld EE Embedded you also need the Java EE APIs.
These APIs might be provided to you by other dependencies like org.jboss.jbossas:jboss-as-client
,
org.jboss.spec:jboss-javaee-6.0
or
org.glassfish.extras:glassfish-embedded-all
.
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>el-impl</artifactId>
<version>2.1.2-b04</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.servlet</groupId>
<artifactId>jboss-servlet-api_3.0_spec</artifactId>
<version>1.0.0.Beta2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.ejb3</groupId>
<artifactId>jboss-ejb3-api</artifactId>
<version>3.1.0</version>
<scope>test</scope>
</dependency>
A DeployableContainer implementation that can run and connect to a embedded(same JVM) WeldApache OpenWebBeans(CDI) instance. No EE APIs are available. This implementation has lifecycle support, so the container will be started and stopped as part of the test run.
Table 12.31. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
![]() |
![]() |
Default Protocol: Local
Example of Maven profile setup
<profile>
<id>openwebbeans-embedded-1</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-openwebbeans-embedded-1</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.openwebbeans</groupId>
<artifactId>openwebbeans-spi</artifactId>
</dependency>
<dependency>
<groupId>org.apache.openwebbeans</groupId>
<artifactId>openwebbeans-impl</artifactId>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-el_2.2_spec</artifactId>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jta_1.1_spec</artifactId>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-validation_1.0_spec</artifactId>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-interceptor_1.1_spec</artifactId>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jcdi_1.0_spec</artifactId>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-atinject_1.0_spec</artifactId>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-servlet_2.5_spec</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.openwebbeans</groupId>
<artifactId>openwebbeans</artifactId>
<version>1.0.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</profile>
A DeployableContainer implementation that can run and connect to a embedded(same JVM) Apache OpenEJB instance. EJB 3.0 APIs are available, but no JMS. This implementation has lifecycle support, so the container will be started and stopped as part of the test run.
Table 12.33. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
Default Protocol: Local
Table 12.34. Container Configuration Options
Name | Type | Default | Description |
---|---|---|---|
openEjbXml | String | Specify the OpenEJB XML configuration file. | |
jndiProperties | String | Specify the OpenEJB properties configuration file. |
Example of Maven profile setup
<profile>
<id>openejb-embedded-3.1</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-openejb-3.1</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>openejb-core</artifactId>
<version>3.1.4</version>
</dependency>
</dependencies>
</profile>