Resin Container

Resin Container

Pax Exam's Resin container is a Java EE container without any OSGi support. This container launches Caucho Resin 4.x 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 Maven JAR artifact com.caucho:resin is sufficient to launch an embedded Resin server.

This is the standard lifecycle of the Resin container:

  1. Resin is started via com.caucho.resin.ResinEmbed.ResinEmbed(). resin.home is set to a temporary directory.

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

  3. A WAR probe is built and deployed.

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

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

  6. Resin is stopped.

  7. The resin.home temporary directory is deleted (depending on the configuration options).

Current restrictions in M2:

  • Resin JUL logging is not yet redirected to SLF4J, the preferred logging solution in Pax Exam 3.

  • All server-specific configuration like JDBC sources must be embedded in the WAR probe in a resin-web.xml configuration file. Any such file found in src/main/webapp/WEB-INF/resin-web.xml will be picked up by the WAR probe builder.