A DeployableContainer implementation that can run and connect to a embedded(same JVM) GlassFish 3.1 instance. This implementation has lifecycle support, so the container will be started and stopped as part of the test run.
Container Injection Support Matrix
@EJB
|
@EJB (no-interface)
|
@Inject (CDI)
|
@Inject (MC)
|
@PersistenceContext @PersistenceUnit
|
|
|
|
|
|
Configuration
Default Protocol: Servlet 3.0
Container Configuration Options
Name
|
Type
|
Default
|
Description
|
bindHttpPort
|
int
|
8181
|
The HTTP port the server should bind to.
|
instanceRoot
|
String
|
|
The instanceRoot to use for booting the server. If it does not exist, a default structure will be created.
|
installRoot
|
String
|
|
The installRoot to use for booting the server. If it does not exist, a default structure will be created.
|
configurationXml
|
String
|
|
The relative or absolute path to the domain.xml file that will be used to configure the instance. If absent, the default domain.xml configuration will be used.
|
configurationReadOnly
|
boolean
|
false
|
If true deployment changes are not written to the configuration and persisted.
|
sunResourcesXml
|
String
|
|
The relative or absolute path to the sun-resources.xml file that will be used to add resources to the instance using the add-resources asadmin command.
|
Example of Maven profile setup
<profile>
<id>glassfish-embedded-3.1</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-glassfish-embedded-3.1</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.glassfish.extras</groupId>
<artifactId>glassfish-embedded-all</artifactId>
<version>3.1</version>
</dependency>
</dependencies>
</profile>