EAP 7 basic configuration
JBoss EAP provides two operating modes for the servers: the standalone mode and the domain mode. A standalone server is a Java process which is governed by a single management point using a configuration file. A domain server, on the other hand, is a group of Java processes which are managed through a single point called the Domain Controller and its configuration file.
The difference between the two operating modes is related to management capabilities rather than functionalities: a clear example of this is the high availability (HA) functionality that is available both in the standalone mode and in the domain mode; you will just use different configuration files to manage your cluster. Let's see more in detail the specific server configuration.
Standalone configuration
A standalone server is an independent server process which uses a single configuration file. The configuration, by default, is stored in the JBOSS_HOME/standalone/configuration
folder. Within this directory, some built-in configurations are available. Here is a short description of them:
standalone.xml
: This is the default standalone configuration file used by the application server. It does not include the messaging subsystem and is not able to run in a cluster.standalone-full.xml
: This configuration adds to the default configuration the messaging provider andiiop-openjdk
libraries.standalone-ha.xml
: This configuration enhances the default configuration with clustering support (JGroups/mod_cluster
).standalone-full-ha.xml
: This configuration adds both clustering capabilities and the messaging / iiop openjdk libraries.
If you want to start a non-default configuration, then you can use the -c
parameter. Here's, for example, how to start the server using the ha
server configuration:
$ ./standalone.sh -c standalone-ha.xml
Domain configuration
When running in domain mode the configuration is maintained in a single file named domain.xml
that resides on the domain controller. This file contains a set of profiles, each one corresponding to the configuration seen earlier in the standalone mode, so you will be able to find the following XML structure within it:
<profiles> <profile name="default">. . .</profile> <profile name="ha"> . . . </profile> <profile name="full"> . . .</profile> <profile name="full-ha">. . .</profile> </profiles>
Each domain is logically divided into server groups that contain the single server instances. The server groups are bound to the profiles described so far:
<server-groups> <server-group name="main-server-group" profile="full"> <socket-binding-group ref="full-sockets"/> </server-group> <server-group name="other-server-group" profile="full-ha"> <socket-binding-group ref="full-ha-sockets"/> </server-group> </server-groups>
The single server instances are defined in the host.xml
file that is included in every host controller. Within this file you will find the list of servers that will be available on that host:
<servers> <server name="server-one" group="main-server-group"> </server> <server name="server-two" group="main-server-group" auto-start="true"> <socket-bindings port-offset="150"/> </server> <server name="server-three" group="other-server-group" auto-start="false"> <socket-bindings port-offset="250"/> </server> </servers>
We will discuss more in detail about the domain core components in Chapter 3, Managing EAP in Domain Mode, of this book. Whatever your server mode, a number of common configuration concepts apply; in the next sections of this chapter we will describe them.