Skip to end of metadata
Go to start of metadata

An Arquillian container adapter (DeployableContainer implementation) that can connect to and run tests on a JBoss AS 7.1 or JBoss EAP 6.0 instance running locally or on a separate machine (effectively a different JVM). This container adapter has no lifecycle support, so it can not start and stop the server. It relies on a server that is already running.

Container Injection Support Matrix

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

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

Configuration

Default Protocol: jmx-as7

Container Configuration Options

Name Type Default Description
managementAddress
String 127.0.0.1 The ip address of the running server instances management interface
managementPort
int 9999
The management port for deployment
username String null The username for the ManagementRealm (not required when server is running on localhost)
password String null The password for the ManagementRealm (not required when server is running on localhost)

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.

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.