JBoss AS 7.2 Container

JBoss AS 7.2 Container

Since Pax Exam 3.1.0.

 

Pax Exam's JBoss AS 7.2  container is a Java EE container without any OSGi support. This container launches JBoss AS 7.2.0.Final embedded in the same VM and deploys any Java EE modules configured by Pax Exam options and a WAR test probe built on the fly from the classpath contents.

The artifact mvn:org.jboss.as/jboss-as-dist/7.2.0.Final/zip does not currently exist in Maven Central or any other Maven repository, due to RedHat's release policies. You can check out the sources from GitHub and build the 7.2.0.Final tag to install JBoss AS 7.2.0 in your local Maven repository or set the pax.exam.jboss.home configuration property to any local installation of a compatible JBoss AS/JBoss EAP/Wildfly installation.

 

This is the standard lifecycle of the JBoss container:

  1. If the directory configured in pax.exam.jboss72.home is empty or does not exist, the JBoss AS 7.2.0 distribution Maven artifact is downloaded and installed in that directory.

  2. The directory configured in pax.exam.jboss72.config.dir (defaulting to src/test/resources/jboss72-config) is used as JBoss configuration directory by setting the system property jboss.server.config.dir.

  3. If pax.exam.jboss72.home is non-empty, Pax Exam does not copy any configuration files and works with the existing installation in that directory, throwing an exception if the JBoss module launcher cannot be found in the expected place.

  4. JBoss AS is started via org.jboss.as.embedded.EmbeddedServerFactory.create().

  5. Any Java EE modules configured by the user are deployed.

  6. A WAR probe is built and deployed.

  7. All tests contained in the probe are executed within the container.

  8. All Java EE modules (including the WAR probe, if any) are undeployed.

  9. JBoss AS is stopped.

  10. The framework storage is deleted (depending on the configuration options).