By default, the domain controller is located on the same machine where you started your domain:
You can, however, configure your host to use a domain controller located on a remote host, in the following way:
Configuring the domain controller on a remote host means that the local configuration (domain.xml) will not be used and that all server nodes will use the centralized configuration, stored in the remote host.
Configuring the JVM
One of the key aspects of the domain configuration is the definition of the JVMs that are a part of the domain. The JVMs’ elements are defined into the host.xml file, where you can specify their settings and associate them with a name:
This JVM definition can then be used (and possibly overridden) as part of your server group configuration. For example, the server group other-server-group (domain.xml) will use the default JVM for all server nodes, re-defining the heap max-size setting:
The defined JVMs can be also associated with a single server, thus overriding the server group definition. For example, here server-one (defined in host.xml) inherits the default JVM configuration, setting a custom min (512 MB) and max heap size (1GB):
Adding JVM options to a server definition
If you want to further specialize your JVM configuration, for example, by adding nonstandard options to the virtual machine, you can use the jvm-options element. In this sample, we are adding to the default JVM options the concurrent low-pause garbage collector:
Order of precedence between elements
In the earlier section, we showed how to use the default JVM definition in different configuration files. As a matter of fact, the Java Virtual Machine definition is a typical example of overlapping between configuration files, which means that the JVM can be defined either at:
Host level: In this case, the configuration will apply to all servers that are defined in host.xml Server
group level: In this case, the configuration applies to all servers that are part of the group
Server level: In the last case, the configuration is used just for the single host
So far, so good. However, what happens if we define an element with the same name at multiple levels? As a matter of fact, the application server resolves overlapping by letting most specific elements override their parent configuration. In other words, if you define a generic JVM at host level, it will be overridden by the same JVM at servergroup level.
The following image describes the elements that can be defined (and possibly overridden) at different configuration levels:
As you can see, this list also includes some elements, such as the element, the , and the that we have discussed in tutorials before.
Get Updates on Tech posts, Interview & Certification questions and training schedules