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 9.1. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
Namespace: urn:arq:org.jboss.arquillian.container.jbossas.remote_5
Table 9.2. Container Configuration Options
Name | Type | Default | Description |
---|---|---|---|
profileName | String | default | ProfileService profileKey. Used to load the correct profile into the DeploymentManager. |
remoteServerAddress | String | localhost | Used by Servlet Protocol to connect to the remote server. |
remoteServerHttpPort | int | 8080 | Used by Servlet Protocol to connect to the remote server. |
localDeploymentBindAddress | String | localhost | Bind Address for the HTTP server serving deployments to the remote server. Address must be reachable from remote server. |
localDeploymentBindPort | int | 9999 | Bind Port for the HTTP server serving deployments to the remote server. Port must be reachable from remote server. |
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.Alpha4</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 9.3. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
Namespace: urn:arq:org.jboss.arquillian.container.jbossas.remote_5_1
Table 9.4. Container Configuration Options
Name | Type | Default | Description |
---|---|---|---|
profileName | String | default | ProfileService profileKey. Used to load the correct profile into the DeploymentManager. |
remoteServerAddress | String | localhost | Used by Servlet Protocol to connect to the remote server. |
remoteServerHttpPort | int | 8080 | Used by Servlet Protocol to connect to the remote server. |
localDeploymentBindAddress | String | localhost | Bind Address for the HTTP server serving deployments to the remote server. Address must be reachable from remote server. |
localDeploymentBindPort | int | 9999 | Bind Port for the HTTP server serving deployments to the remote server. Port must be reachable from remote server. |
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.Alpha4</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 9.5. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
Namespace: urn:arq:org.jboss.arquillian.container.jbossas.managed_5_1
Table 9.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 Servlet Protocol to connect to 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. |
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.Alpha4</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 9.7. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
![]() |
![]() |
Namespace: urn:arq:org.jboss.arquillian.container.jbossas.remote_6_0
Table 9.8. Container Configuration Options
Name | Type | Default | Description |
---|---|---|---|
profileName | String | default | ProfileService profileKey. Used to load the correct profile into the DeploymentManager. |
remoteServerAddress | String | localhost | Used by Servlet Protocol to connect to the remote server. |
remoteServerHttpPort | int | 8080 | Used by Servlet Protocol to connect to the remote server. |
localDeploymentBindAddress | String | localhost | Bind Address for the HTTP server serving deployments to the remote server. Address must be reachable from remote server. |
localDeploymentBindPort | int | 9999 | Bind Port for the HTTP server serving deployments to the remote server. Port must be reachable from remote server. |
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.Alpha4</version>
</dependency>
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-client</artifactId>
<version>6.0.0.20100721-M4</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 9.9. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
![]() |
![]() |
Namespace: urn:arq:org.jboss.arquillian.container.jbossas.managed_6
Table 9.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. |
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. |
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.Alpha4</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.20100721-M4</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 9.11. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
![]() |
![]() |
Namespace: urn:arq:org.jboss.arquillian.container.jbossas.embedded_6
Table 9.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. |
httpPort | int | 8080 | Used by Servlet Protocol to connect to the server. |
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.Alpha4</version>
</dependency>
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-depchain</artifactId>
<version>6.0.0.20100721-M4</version>
<type>pom</type>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-depchain</artifactId>
<version>6.0.0.20100721-M4</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 9.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.0 instance. This implementation has lifecycle support, so the container will be started and stopped as part of the test run.
Table 9.14. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
![]() |
![]() |
Namespace: urn:arq:org.jboss.arquillian.container.glassfish.embedded_3
Table 9.15. Container Configuration Options
Name | Type | Default | Description |
---|---|---|---|
bindHttpPort | int | 8181 | The HTTP port the server should bind to. |
instanceRoot | String | target/glassfish_(RANDOM) | The instanceRoot to use for booting the server. If it does not exist, a default structure will be created. |
domainXml | 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. | |
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. | |
autoDelete | boolean | true | Should the deployments be deleted on shutdown. |
Example of Maven profile setup
<profile>
<id>glassfish-embedded-3</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-glassfish-embedded-3</artifactId>
<version>1.0.0.Alpha4</version>
</dependency>
<dependency>
<groupId>org.glassfish.extras</groupId>
<artifactId>glassfish-embedded-all</artifactId>
<version>3.0.1-b02</version>
</dependency>
</dependencies>
</profile>
A DeployableContainer implementation that connects to a remote GlassFish 3 instance and deploys the test archive using JSR-88.
Table 9.16. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
Namespace: urn:arq:org.jboss.arquillian.container.glassfish.remote_3
Table 9.17. Container Configuration Options
Name | Type | Default | Description |
---|---|---|---|
deploymentUri | String | deployer:Sun:AppServer::localhost:4848 | The administrative port and host the JSR-88 client should connect to. |
deploymentFactoryClass | String | org.glassfish.deployapi.SunDeploymentFactory | The JSR-88 implementation factory class. |
deploymentUsername | String | The admin username for performing JSR-88 deployments. | |
deploymentPassword | String | The admin password for performing JSR-88 deployments. | |
deploymentTimeoutSeconds | int | 5 | The number of seconds to wait for the deployment to complete. |
remoteServerHttpPort | int | 8080 | The HTTP port of the remote server. |
remoteServerAddress | String | localhost | The host of the remote server. |
Example of Maven profile setup
<profile>
<id>glassfish-remote-3</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-glassfish-remote-3</artifactId>
<version>1.0.0.Alpha4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.deployment</groupId>
<artifactId>deployment-client</artifactId>
<version>3.0.1-b19</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 9.18. 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.
Namespace: urn:arq:org.jboss.arquillian.container.tomcat.embedded_6
Table 9.19. 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.Alpha4</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 9.20. Container Injection Support Matrix
@Resource | @EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|---|
![]() |
![]() |
Namespace: urn:arq:org.jboss.arquillian.container.jetty.embedded_6_1
Table 9.21. 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). |
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.Alpha4</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 9.22. Container Injection Support Matrix
@Resource | @EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|---|
![]() |
![]() |
Namespace: urn:arq:org.jboss.arquillian.container.jetty.embedded_7
Table 9.23. 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). |
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.Alpha4</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 9.24. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
![]() |
![]() |
<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.Alpha4</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) 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 9.25. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
![]() |
![]() |
Namespace: urn:arq:org.jboss.arquillian.container.weld.ee.embedded_1_1
Table 9.26. 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.Alpha4</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>
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) Ironjacamar 1.0 JCA Container. Only the Java EE Connector Architecture 1.6 API is available. This implementation has lifecycle support, so the container will be started and stopped as part of the test run.
The IronJacamar user guide contains information on how to setup the IronJacamar/Embedded environment.
The IronJacamar artifacts are located in the JBoss Nexus repository under the group id
org.jboss.ironjacamar
More information about IronJacamar is available at http://www.jboss.org/ironjacamar/.
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 9.28. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
![]() |
![]() |
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.Alpha4</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-M4</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 9.29. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (CDI) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
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.Alpha4</version>
</dependency>
<dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>openejb-core</artifactId>
<version>3.1.2</version>
</dependency>
</dependencies>
</profile>
A DeployableContainer implementation that can run and connect to a embedded(same JVM) OSGi container. This implementation has lifecycle support, so the container will be started and stopped as part of the test run.
Table 9.30. Container Injection Support Matrix
@EJB | @EJB (no-interface) | @Inject (JSR-330) | @Inject (MC) | @PersistenceContext @PersistenceUnit |
---|---|---|---|---|
![]() |
This container use @javax.inject.Inject
as a injection point marker. Supports injection of Bundle and BundleContext.
<profile>
<id>osgi-embedded-4.2</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-osgi-embedded-4.2</artifactId>
<version>1.0.0.Alpha4</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<version>4.2.0</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.compendium</artifactId>
<version>4.2.0</version>
</dependency>
<dependency>
<groupId>org.jboss.osgi.framework</groupId>
<artifactId>jboss-osgi-framework-core</artifactId>
<version>1.0.0.Alpha6</version>
</dependency>
<dependency>
<groupId>org.jboss.osgi.resolver</groupId>
<artifactId>jbosgi-resolver-felix</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-log4j</artifactId>
<version>2.1.0.GA</version>
</dependency>
</dependencies>
</profile>