The instance root directory, represented as instance-dir, is the parent directory of a server instance directory. Embedded Sun GlassFish Enterprise Server uses the server instance directory for domain configuration files.
Specify the instance root directory if any of the following conditions applies:
You are using a domain directory that is at a non-default location, that is not contained in the domains subdirectory of the installation root directory.
For example, if your domain directory is at /tmp/domain1, specify the instance root directory as /tmp/domain1.
The domains subdirectory of your installation root directory contains multiple domain directories.
For example, the domains subdirectory of the /home/gfuser/glassfish installation root directory might contain the domain directories domain1 and domain2. To use the domain directory domain2, specify the instance root directory as /home/gfuser/glassfish/domains/domain2.
How embedded Sun GlassFish Enterprise Server uses the instance root directory depends on the content of this directory:
If the instance root directory contains domain configuration files, embedded Sun GlassFish Enterprise Server reads the configuration files.
If the instance root directory does not contain domain configuration files, embedded Sun GlassFish Enterprise Server copies configuration files into this directory.
If the instance root directory does not exist, embedded Sun GlassFish Enterprise Server creates the directory and copies configuration files into the directory.
If the instance root directory is not specified, embedded Sun GlassFish Enterprise Server uses the domains subdirectory of the installation root directory for domain configuration files.