Skip to end of metadata
Go to start of metadata

An Arquillian container adapter (DeployableContainer implementation) that can start and stop a local JBoss AS 7.1 or JBoss EAP 6.0 process and run tests on it over a remote protocol (effectively in a different JVM).

Container Injection Support Matrix

@EJB @EJB (no-interface) @Inject (CDI) @Resource @PersistenceContext / @PersistenceUnit

The JBoss AS 7 container adapters also support OSGi Bundle / Context injection in OSGi modules and Module Contexts/ServiceController when developing Modules (only when using the jmx-as7 protocol).


Default Protocol: jmx-as7

Container Configuration Options

Name Type Default Description
jbossHome String $JBOSS_HOME The JBoss configuration to start.
javaHome String $JAVA_HOME The Java runtime to use to start the server.
modulePath String $module.path The location of the module repository.
javaVmArguments String -Xmx512m -XX:MaxPermSize=128m JVM arguments used to start the server.
startupTimeoutInSeconds int 30 Time to wait before throwing Exception on server startup.
outputToConsole boolean true Should the server startup console log be piped to the console
serverConfig String standalone.xml Which server configuration file to startup with
managementAddress String The ip address of the running server instances manage interface
managementPort int 9999 The management port for deployment
allowConnectingToRunningServer boolean
false If true, if a running AS is found on managementPort, it is used; if false, fails.
username String null The username for the ManagementRealm (not required by default)
password String null The password for the ManagementRealm (not required by default)

Example Maven profile:

By default, the JBoss AS 7 container adapters execute tests over JMX. If the test relies on CDI scopes to be active, they will not work on this protocol. You can configure Arquillian to run tests using the Servlet protocol instead, which is the default for most other Arquillian Java EE adapters.

First, you need to add the Servlet protocol dependency to the Maven profile. The version of the Servlet protocol dependency is managed by the Arquillian BOM, which you should have configured in the dependency management section.

Next, you need to set the default protocol in the arquillian.xml descriptor:

At the moment, this setting changes the default protocol for all container adapters. There's an open issue for making the default protocol configurable per container adapter (see ARQ-579).

MacOS with Java 7
If you are on Mac OS with Java 7 you might get the following error while running tests:

This is an issue in Java 7, and you can work around this by adding a VM paramter.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Feb 12, 2014

    To set Container Configuration Option javaVmArguments from command line (or in IDE) use -Djboss.options


    -Djboss.options="-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y -Xmx512m -XX:MaxPermSize=128m" (to enable remote debugging on port 8787)

    1. Mar 04, 2014

      Actually, you can override/create any property in arquillian.xml via command line.

      The pattern is:


      Example for <container qualifer="jboss"><configuration><property name="javaVmArguments" /></property/configuration>
      would map to -Darq.container.jboss.configuration.javaVmArguments

      More details here