Payara Server Embedded Arquillian Container

The Payara Server Embedded container lifecycle is managed by Arquillian and resides in the same JVM where tests are executed using a local protocol.


The Payara Server Embedded Arquillian container can be found on Maven Central, and can be included in your project using the following Maven coordinates:


You can find the latest artifact version from here.

Configuring the Container

The container can be configured via the arquillian.xml using the standard Arquillian Container Configuration mechanism.

Table 1. Configuration Options
Name Description Default


The port number of the http-listener for the embedded Payara Server.



The port number of the https-listener for the embedded Payara Server.



Specifies whether Arquillian should cleanup on shutdown. This recursively deletes files in the instanceRoot directory.



Specifies whether Payara should write back any changes to specified configuration file or config/domain.xml at the specified instance root.



Set the location of configuration file i.e. domain.xml using which the Payara Server should run.


The install root directory is the parent directory of a Payara Server instance directory and corresponds to the base directory for an installation of Payara Server.


The instance root directory is the domain directory and embedded Payara Server uses the server instance directory for domain configuration files.

the default domain directory


A comma-separated list of Payara resources.xml files containing resources that will be added to the Payara instance using the add-resources command.


A colon-separated list of 'key=value' properties that will be created on the server upon boot of the embedded server. These values should be formatted as when executing the create-system-properties command.


Full path to a hazelcast configuration file used to override the hazelcast bootstrap default configuration.


To configure the Arquillian Container options, you need to use an arquillian.xml file placed on the test classpath. Here’s an example arquillian.xml file. It configures adminPort with a static value. It configures bindHttpsPort as a value of a system property my.httpsport, which you can specify for example in the maven surefire plugin using the systemPropertyVariables option or on command line like mvn -Dmy.httpsport=8081 test. It overrides hazelcast bootstrap configuration indicating a path for a XML file in property hazelcastConfigurationFile.

Example arquillian.xml file
<?xml version="1.0"?>
<arquillian xmlns:xsi=""

    <container qualifier="payara-embedded" default="true">
            <property name="bindHttpPort">8080</property>
            <property name="bindHttpsPort">${my.httpsport}</property>
            <property name="hazelcastConfigurationFile">/home/payara/hazelcast-config.xml</property>

If you want to configure more containers, you can switch between them by setting the arquillian.launch system property to the container’s qualifier. This is how you can do it with the maven surefire plugin (my.httpsport system property is used to set the bindHttpsPort property in arquillian.xml):

Example Surefire plugin configuration in a pom.xml file