Mindmajix

Configuring the domain controller

Configuring the domain controller

By default, the domain controller is located on the same machine where you started your domain:

<domain-controller>
<local/>
</domain-controller>

You can, however, configure your host to use a domain controller located on a remote host, in the following way:

<domain-controller>
<remote host=”192.168.100.1″ port=”9999″/>
</domain-controller>

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:

<jvms>
<jvm name=”default”>
<heap size=”64m” max-size=”512m”/>
</jvm>
</jvms>

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:

<server-group name=”other-server-group” profile=”default”>
<jvm name=”default”>
<heap max-size=”512m”/>
</jvm>
<socket-binding-group ref=”standard-sockets”/>
</server-group>

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):

<server name=”server-one” group=”main-server-group” autostart=”
true”>
<jvm name=”default”>
<heap size=”512m” max-size=”1G”/>
</jvm>
</server>

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:

<jvm name=”default”>
<heap size=”64m” max-size=”128m”/>
<jvm-options>
<jvm-option value=”-XX:+UseConcMarkSweepGC”/>

</jvm-options>
</jvm>

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.

<!– host.xml –>
<jvms>
<jvm name=”default”>
<heap size=”64m” max-size=”256m”/>
</jvm>
</jvms>
<!—- domain.xml –>
<!—- Here the “default” jvm will be overridden by the server group
jvm definition –>
<server-group name=”other-server-group” profile=”default”>
<jvm name=”default”>
<heap size=”64m” max-size=”512m”/>
</jvm>
<socket-binding-group ref=”standard-sockets”/>
</server-group>
If you also define it at the server level, then that will be the final choice for that server.
<!—- Here, the server definition overrides any other host/group
definition –>

<server name=”server-one” group=”main-server-group”>
<jvm name=”default”>
<heap size=”256m” max-size=”768m”/>
</jvm>
</server>

The following image describes the elements that can be defined (and possibly overridden) at different configuration levels:

Screenshot_10

As you can see, this list also includes some elements, such as the <path> element, the <interface>, and the <system-properties> that we have discussed in tutorials before.

0 Responses on Configuring the domain controller"

Leave a Message

Your email address will not be published. Required fields are marked *

Copy Rights Reserved © Mindmajix.com All rights reserved. Disclaimer.
Course Adviser

Fill your details, course adviser will reach you.