Sun GlassFish Enterprise Server v3 Embedded Server Guide

Using an Existing domain.xml File

Using an existing domain.xml file avoids the need to configure embedded Enterprise 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 Enterprise Server. To specify an existing domain.xml file, invoke the installRoot, instanceRoot, or configurationFile method of the EmbeddedFileSystem.Builder class or a combination of these methods.