Skip to content

Instantly share code, notes, and snippets.

@VineetReynolds
Created September 29, 2011 19:10
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save VineetReynolds/1251637 to your computer and use it in GitHub Desktop.
Arquillian dev notes
1. Configuration XMLs are to be specified using URIs (file:...). Glassfish verifies whether the URI is absolute (containing a scheme) or a not.
2. Glassfish copies the configuration XML to the config directory of the instance root.
3. The specified instanceRoot must have a config directory, and may have a domain.xml file (that is optional).
4. If a configurationXml file is specified in arquillian.xml, then this file is copied into the instance root (but not overwritten). If no configurationXml file is specified in arquillian.xml, then the domain.xml file is extracted from embedded glassfish and copied to the instance root (again not overwritten).
5. The instanceRoot must also have a docRoot directory (not specified in domain.xml), and other files like cacerts.jks and keystore.jks. The latter files are required because they are usually specified in domain.xml, for configuring the https-listener.
6. The installRoot must have subdirectories named 'domains' and 'lib'. Although this is not required in most cases of operating the embedded container, there are cases where these directories will be use; the 'asadmin add-resources' command, for example, will require that deployment descriptors present in lib\install\applications\... be present.
Verifications that have been added:
1. installRoot is a directory that contains 'domains' and 'lib' sub-directories.
2. instanceRoot is a directory that contains 'docroot' and 'config' sub-directories.
3. configurationXml is a file, whose URI representation is absolute (i.e. the translated URI will start with a file:/ scheme).
4. If the configuration contains values for both instanceRoot and configurationXml, then a warning is logged when the instanceRoot already contains a domain config file. This is because embedded Glassfish might/will not overwrite the already present domain config file in the instance root. When no instanceRoot is provided, the default behavior of embedded Glassfish is to copy an embedded domain.xml file into the instance's config dir; when a configurationXml file is provided, this file is copied instead, into the instance's config dir.
5. The GlassfishConfiguration object is modified to contain a URI instead of a filesystem path for the configurationXml value. This is to enable a consistent scheme for paths in arquillian.xml. The returned GlassfishConfiguration object is later used by Arquillian to configure and start the embedded Glassfish container.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment