JBoss Community Archive (Read Only)

Arquillian Old

GlassFish 3.1 - Remote

A DeployableContainer implementation that connects to a remote GlassFish 3.1 instance and deploys the test archive using the admin REST api.

Container Injection Support Matrix


@EJB (no-interface)

@Inject (CDI)

@Inject (MC)

@PersistenceContext @PersistenceUnit







Default Protocol: Servlet 3.0

Container Configuration Options





adminPort or
remoteServerAdminPort (deprecated)



The administrative port the client should connect to.

adminHost or
remoteServerAddress (deprecated)



Glassfish Admin Server (DAS) host address.

adminHttps or
remoteServerAdminHttps (deprecated)



Use SSL for communicating with the admin server.

remoteServerHttpPort (deprecated)



The HTTP port of the remote server.




The name of the admin user of your DAS. If omitted, no authentication will be used to access the DAS. This case you must have empty password for your admin user.




The password of the admin user of your DAS. Canot be omitted if you declare the admin user. If no authentication will be used to access the DAS you must have empty password for your admin user.




Specifies the target to which you are deploying. We use the “target” as property key with the same semantics as the standard GlassFish utilities do.

Valid values of the target are:
 -  server:  Deploys the component to the default Admin Server instance (on your DAS server). It is not a recommended practice to use the DAS as test instance.

 -  instance_name: Deploys the component to the specified stand-alone sever instance, which may be on the same hosts or can be on a different one as the DAS server.

 -  cluster_name: Deploys the component to every server instance in the cluster. They can be on the same or on several other hosts as the DAS server. Note: Arquillion use  only one instance to run the test case, trying to find a running instance if any.
Note: The domain name as a target (which is valid for GlasFish) is not a reasonable deployment scenario in case of testing.

The HOST address and port numbers of the test server instance used by Arquillian (determined by the target property) been retrieved automatically from the DAS server. You have to make them accessible for your test environment (consider any firewall or proxy configuration).




A comma-separated list of library JAR files. Specify the library JAR  files by their relative or absolute paths. Specify relative paths relative to domain-dir/lib/applibs. The libraries are made available to the application in the order specified. For more detail, please refer to GlassFish Server 3.1 Administration Guide.




Optional keyword-value pairs  that  specify  additional properties for the deployment. The available properties are determined by the implementation of the  component that is being deployed. For
more detail, please refer to GlassFish Server 3.1 Administration Guide.




The packaging archive type of the component that is being deployed. Only valid value is: osgi meaning that the component is packagedas an OSGi Alliance bundle. The type option is optional. If the component is packaged as a regular archive, omit this option. For more detail, please refer to "OSGi Application Development using GlassFish Server"

The contextroot that will be used to run the tests is retrieved automatically from the DAS server. If you do not have sun-web.xml or glassfish-web.xml file in your web application, the GlassFish will use the name of your deployment without the extension as contextroot. The same rule is applied for enterprise applications if you do not have application.xml file. The jar test-deployments are treated as a web application. In case of OSGi Alliance bundle, use the “Web-ContextPath” metadata in the META-INF/MANIFEST.MF to specify the context root.

You can use the above standard GlassFish xml files as normal to declare your contextroot to be applied. For more detail, please refer to GlassFish Server 3.1 Administration Guide. You should consider the above to avoid any conflict with your already deployed web or enterprise applications in your administrative domain.

Example of Maven profile setup


Sample arquillian.xml

<?xml version="1.0"?>
<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    <!--  Uncomment to have test archives exported to the file system for inspection  -->
        <property name="deploymentExportPath">target/</property>
    <group qualifier="Grid">

        <container qualifier="remote-gf1" default="true" >
                <property name="adminUser">admin</property>
                <property name="adminPassword">changeit</property>
                <property name="target">server</property>
        <container qualifier="remote-gf2">
                <property name="adminUser">admin</property>
                <property name="adminPassword">changeit</property>
                <property name="adminHttps">false</property>
                <property name="adminHost">localhost</property>
                <property name="adminPort">4848</property>
                <property name="serverHttps">false</property>
                <property name="target">ejb-instance</property>
JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-10 12:19:15 UTC, last content change 2011-11-11 03:18:31 UTC.