Skip to end of metadata
Go to start of metadata

A DeployableContainer implementation that can connect to and run tests in a JBoss EAP 5.1 instance running locally or on a separate machine (effectively a different JVM). This implementation has no lifecycle support, so it can not be started or stopped.

Container adapter selection

Arquillian has adapters for the JBoss Application Server 5.1 (the community project), but does not have distinct adapters for the JBoss Enterprise Application Platform 5.1, the product based on the community project.

However, Arquillian can be configured to run tests on JBoss EAP 5.1 using a mix of JBoss AS 5.1 and JBoss AS 6.0 dependencies and by updating the JBoss EAP 5 profile service to disable authentication.

Supported injections

Container Injection Support Matrix

@EJB @EJB (no-interface) @Inject (CDI) @Inject (MC) @PersistenceContext @PersistenceUnit

Profile service modification

If authentication is enabled in the JBoss EAP 5 profile service, Arquillian will be unable to deploy the archive. If that's the case, we'll need to disable it. (See the last section of this chapter to learn how to setup Arquillian to authenticate properly).

To disable authentication, edit the file deploy/profileservice-jboss-beans.xml and comment out the following beans nested within the ProfileServiceProxyFactory bean as shown:

Arquillian dependencies

Add the necessary Arquillian dependencies for executing the tests inside/against a JBoss EAP 5.1 server that has been started and is available via localhost. We'll use a Maven profile named arquillian-jboss-eap-5.1-remote.

Note that Arquillian with JBoss EAP 5.1 requires the JBoss AS 5.1 client, but the JBoss AS 6.0 profile service client.

The parent of the jboss-as-client dependency (jboss-as-parent) includes repository configuration for the old JBoss Maven repository ( Therefore, a mirror has to be configured in the Maven settings.xml file so that this repository is replaced with the new JBoss Nexus (Deprecated) repository (

Secure server support

If you aren't able to disable the authentication on the profile service, you can instead configure Arquillian to authenticate properly.

If you haven't done so already, create an Arquillian configuration file, arquillian.xml, on the classpath (e.g., src/test/resources). Add the following container configuration for the JBoss EAP 5.1 adapter:

Next, create an authentication configuration file, auth.conf, on the classpath (e.g., src/test/resources).

Next, create a JNDI properties file,, on the classpath (e.g., src/test/resources) to set the authentication credentials and activate the configuration:

Finally, add a build element to the Maven profile defined above to set a system variable that activates the authentication configuration when the tests are run.

In summary, we added the contextFactory configuration property in arquillian.xml, an auth.conf file, a file and passed to the Maven Surefire plugin.

You can run the test in Eclipse using the the "Maven test" option provided by the Maven Integration for Eclipse plugin. The test will work just as it does from the commandline.

To run the test using the internal JUnit runner in Eclipse, you need to set needs in the Run Configuration for each test.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jul 17, 2012

    Good Walkthrough.  Having issue with this INFO message though:

    INFO: Could not read active container configuration: null

    It appears that arqullian cannot find the application server that is locally running.  Any suggs?

  2. Jul 17, 2012

    Also, what is the url for the mirror repo?  I get url blank maven exception when there is nothing there.  I have added this instead, and I dont know if its correct.



          <name>Use new repo to handle requests to deprecated repo</name>






          <name>Use new repo to handle requests to deprecated repo</name>




  3. Aug 10, 2012


    Could you post this question on the Arquillian forums. I haven't used the JBoss AS 5.1 adapter much and I'm afraid no one else from the team is seeing these comments. Please add a link to the forum thread once you post it so readers can follow through to it.

    1. Sep 13, 2012

      Sorry, I got taken off of trying to get arquillian to work on our project.  Back on it now, and I just saw your comment.  Will post to Arquillian forum.