Embedded GlassFish Container
The Embedded GlassFish container adapts the glassfish-embedded-all
artifact to the Pax Exam test container API. Embedded GlassFish does not support any of the OSGi features of a stand-alone GlassFish server.
This is the standard lifecycle of the Embedded GlassFish container:
- If the directory configured in
pax.exam.glassfish.config.dir
(defaulting tosrc/test/resources/glassfish-config
) contains adomain.xml
file, then this file is used to configure the Embedded GlassFish server. - The embedded server is started.
- A WAR probe is built and deployed. This probe contains all test classes and their dependencies.
- All tests contained in the probe are executed within the container.
- All Java EE modules (including the WAR probe) are undeployed.
- The embedded server is stopped.
If you require any additional libraries for the server or domain class loader (e.g. JDBC drivers), simply add them to the classpath of your project.