7 Reasons to love JBoss AS7 - Part 6
5) Multi-server topology
One of the primary new features of JBoss Application Server 7 is the ability to manage multiple server instances from a single control point (without any special add-ons, such as Jopr). A collection of such servers is referred to as the members of a “domain” with a single Domain Controller process acting as the central management control point. All of the server instances in the domain share a common management policy, with the Domain Controller acting to ensure that each server is configured according to that policy. Domains can span multiple physical (or virtual) machines, with all server instances on a given host under the control of a special Host Controller process. One Host Controller instance is configured to act as the central Domain Controller. The Host Controller on each host interacts with the Domain Controller to control the life cycle of the application server instances running on its host and to assist the Domain Controller in managing them.
When you launch a JBoss Application Server 7 managed domain on a host, your intent is to launch a Host Controller and usually at least one server instance. On one of the hosts the Host Controller should be configured to act as the Domain Controller.
Each “Server” represents an actual application server instance. The server runs in a separate JVM process from the Host Controller. The Host Controller is re- sponsible for launching that process. (In a managed domain the end user cannot directly launch a server process from the command line.) The Host Controller synthesizes the server’s configuration by combining elements from the domain wide configuration (from domain.xml) and the host-specific con- figuration (from host.xml).
<servers> <server name="server-one" group="main-server-group"> <jvm name="default"/> </server> <server name="server-two" group="main-server-group" auto-start="true"> <socket-binding-group ref="standard-sockets" port-offset="150"/> <jvm name="default"> <heap size="64m" max-size="256m"/> </jvm> </server> <server name="server-three" group="other-server-group" auto-start="false"> <socket-binding-group ref="standard-sockets" port-offset="250"/> </server> </servers>
A managed domain is all about coordinated multi-server management--with it JBoss Application Server 7 provides a central point through which users can manage multiple servers, with rich capabilities to keep those servers’ configurations consistent and the ability to roll out configuration changes (including rolling deployments) to the servers in a coordinated fashion. For multi-server production environments, the choice of running a managed domain versus standalone servers comes down to whether you want to use the centralized management capabilities a managed domain provides. The means of management is orthogonal to HA functionality, which is available to both standalone and domain modes.
While Java EE servers have always been good at providing enterprise services, such as a component model, high availability and server management, testing applications that run in this environment has always been a challenge for developers. That is, until now.