The following Embedded GlassFish Server directories and files are important:
The installation root directory, represented as as-install, is the parent of the directory that embedded GlassFish Server uses for configuration files. This directory corresponds to the base directory for an installation of GlassFish Server. Configuration files are contained in the following directories in the base directory for an installation of GlassFish Server:
The instance root directory, represented as domain-dir, is the parent directory of a server instance directory. Embedded Oracle GlassFish Server uses the server instance directory for domain configuration files.
If domain-dir is not specified, GlassFish Server creates a directory named gfembedrandom-numbertmp in a temporary directory, where random-number is a randomly generated 19-digit number. GlassFish Server then copies configuration files into this directory. The temporary directory is the value of the system property java.io.tmpdir. You can override this value by specifying the glassfish.embedded.tmpdir property as a system property.
Using an existing domain.xml file avoids the need to configure embedded GlassFish Server programmatically in your application. Your application obtains domain configuration data from an existing domain.xml file. You can create this file by using the administrative interfaces of an installation of nonembedded GlassFish Server.
Note - The built-in domain.xml file used by default by Embedded GlassFish Server can be downloaded from http://embedded-glassfish.java.net/domain.xml.