The domain.xml file contains most of the Sun JavaTM System Application Server configuration. The encoding is UTF-8 to maintain compatibility with regular UNIX text editors. The domain.xml file is located in the domain configuration directory, which is typically domain-dir/config. This file is further described in the following sections:
The sun-domain_1_1.dtd file defines the structure of the domain.xml file, including the elements it can contain and the subelements and attributes these elements can have. The sun-domain_1_1.dtd file is located in the install-dir/lib/dtds directory.
Do not edit the sun-domain_1_1.dtd file; its contents change only with new versions of the Application Server.
The sun-domain_1_1.dtd interface is unstable. An unstable interface might be experimental or transitional, and hence might change incompatibly, be removed, or be replaced by a more stable interface in the next release.
Elements or attributes that appear in the sun-domain_1_1.dtd file but are not described in this chapter are not implemented and should not be used.
For general information about DTD files and XML, see the XML specification.
In this manual, the term default is used in its broader sense, and not in the specific way it is used in the XML 1.0 standard. A default value is an initial value or the value used if no value is present in the XML file. A default value can be any of the following:
A value supplied by the XML parser when no value is found in the domain.xml file. The relevant element or attribute is optional.
A value supplied by the Application Server when no value is found in the domain.xml file and the XML parser doesn’t provide a value. The relevant element or attribute is optional.
An initial value supplied when the domain.xml file is created. The relevant element or attribute might or might not be optional.
Variables and variable references are needed for two reasons:
Parts of the Application Server share much configuration information but differ in specific details.
Parts of the configuration come from the system environment but must still be captured in the configuration.
Variable references appear in the domain.xml file as strings that begin with the characters ${ and end with the character }. For example, the string ${com.sun.enterprise.myVar} is a reference to the variable com.sun.enterprise.myVar .
Variables are defined both outside of and within domain.xml. Predefined variables that exist outside of domain.xml are defined as Java System Properties. Within domain.xml, a variable is defined using the system-property element or the jvm-options element.
The system-property element’s name attribute is the name of a variable; its value attribute is the definition of the variable. For example, the following system-property element defines a port-number variable with the value 6500:
<system-property name="port-number" value="6500"/>
Multiple system-property subelements are permitted within server, config, and domain elements.
A variable defined in the jvm-options element is a Java System Property with the -D flag. For example, the following jvm-options element defines a port-number variable with the value 5500:
<jvm-option>-Dport-number=5500</jvm-option>
Multiple definitions for the same variable are permitted. The Application Server determines the actual value of a variable by searching for its first definition in a strict hierarchy of the elements within domain.xml. The hierarchy is as follows:
server -> config -> jvm-options -> domain -> System
Implicit in this hierarchy is the notion of reference and containment. A variable referenced in a server element is only looked up:
In the config element that references that specific server
In the jvm-options subelements of the config element referenced by that server
One element references another when an attribute of the referencing element has the same value as an attribute of the referenced element. For example, the application-ref element references an application or module that is deployed to its parent server element. The application-ref element’s ref attribute has the same value as the name attribute of a lifecycle-module, j2ee-application, ejb-module, web-module, connector-module, or appclient-module element.
The referencing application-ref element might look like this:
<application-ref ref="MyServlet"/>
The referenced web-module element might look like this:
<web-module name="MyServlet" location="myservletdir"/>
The element hierarchy for the domain.xml file is as follows. To make the hierarchy more readable, elements having property as their last or only subelement are marked with a P, and the property subelements are not shown. Parent/child relationships between elements are shown, but not cardinality. For those details, see the element descriptions.
domain P . applications . . lifecycle-module P . . . description . . j2ee-application . . . description . . web-module . . . description . . ejb-module . . . description . . connector-module . . . description . . appclient-module . . . description . resources . . custom-resource P . . . description . . external-jndi-resource P . . . description . . jdbc-resource P . . . description . . mail-resource P . . . description . . persistence-manager-factory-resource P . . . description . . admin-object-resource P . . . description . . connector-resource P . . . description . . resource-adapter-config P . . jdbc-connection-pool P . . . description . . connector-connection-pool P . . . description . . . security-map . . . . principal . . . . user-group . . . . backend-principal . configs . . config P . . . http-service P . . . . http-listener P . . . . . ssl . . . . virtual-server P . . . iiop-service . . . . orb P . . . . ssl-client-config . . . . . ssl . . . . iiop-listener P . . . . . ssl . . . admin-service P . . . . das-config P . . . connector-service . . . web-container P . . . . session-config . . . . . session-manager . . . . . . manager-properties P . . . . . . store-properties P . . . . . session-properties P . . . ejb-container P . . . . ejb-timer-service P . . . mdb-container P . . . jms-service P . . . . jms-host P . . . log-service P . . . . module-log-levels P . . . security-service P . . . . auth-realm P . . . . jacc-provider P . . . . audit-module P . . . . message-security-config . . . . . provider-config P . . . . . . request-policy . . . . . . response-policy . . . transaction-service P . . . monitoring-service P . . . . module-monitoring-levels P . . . java-config P . . . . profiler P . . . . . jvm-options . . . . jvm-options . . . thread-pools . . . . thread-pool . . . alert-service P . . . . alert-subscription . . . . . listener-config P . . . . . filter-config P . . . system-property . . . . description . servers . . server P . . . application-ref . . . resource-ref . . . system-property . . . . description . system-property . . description