Domain and Cluster Management in JOnAS

The content of this guide is the following:

  1. Target Audience and Rationale
  2. Domain and Cluster Management Functions
  3. Mechanisms used by Domain Management
  4. J2EEDomain MBean
  5. MBeans for domain/cluster monitoring
  6. How to start Servers in a Domain
  7. How to define domain configuration using domain.xml file

Target Audience and Rationale

This guide is intended for JOnAS administrators responsible for the configuration and administration of JOnAS servers running within a management domain.

Domain and Cluster Management Functions

A JOnAS management domain is composed of a set of JOnAS servers that are running under the same management authority. All the servers in the domain must have a distinct server name and a common domain name.

The servers in a domain can be administered by a management application running on a server playing the role of administrator or master. The managed servers play the role of slaves. Note that it is possible to have several masters in a domain. Also note that default configuration corresponds to a slave server running without the discovery service (the role of this service is described below and its configuration here).

Typically, when deploying the JonasAdmin application on a slave, the administrator can manage only the server on which the application is running. When deploying JonasAdmin on a master server, the administrator can manage all the known servers in the domain:

Cluster management facilities was introduced in JOnAS 4.7. A cluster is a group of servers having common properties within a domain. A cluster may be the target of a domain level management operation - currently applications and J2EE modules deployment only.

The domain topology (servers and clusters composing the domain) can be defined using a new domain.xml configuration file. Also, servers and clusters may be dynamically added and removed to the domain via JonasAdmin.

Starting with JOnAS 4.8, domain and cluster management is enhanced with monitoring functions available in JonasAdmin. As in the previous version, clusters may be created by an administrator in a static (via domain.xml) or dynamic (via JonasAdmin) way. These clusters are now called logical cluster. A new class of clusters is supported in the current version, the physical clusters that are detected automatically by the management infrastructure. Several types of physical clusters are supported: Mod JK clusters, Tomcat clusters, CMI clusters, etc. All the members of a type of physical cluster share specific properties which depend on the cluster type, e.g., all the members of a CMI cluster have the same JGroups configuration. Note that a given JOnAS instance may belong to several physical and logical clusters.

An important domain level administration operation introduced in JOnAS 4.8, is the possiblity to start/stop the managed servers via a so called cluster daemon. Cluster daemons can be defined and associated to servers using the domain.xml configuration file. A cluster daemon has to be collocalized (located on the same machine) with the servers it controls.

Mechanisms used by Domain Management

Basically, domain management in JOnAS relies on JSR 160 specification. When a JOnAS server is started, it creates at least one JSR 160 connector server as explained in JSR 160 support in JOnAS.

A connector server makes it possible for a JMX remote API client to access and manage the MBeans exposed through the MBean server running in a remote JVM. In order to establish a connection, the remote client needs to know the address of the connector server. JSR 160 does not provide any specific API that would make it possible for a client to find the address of a connector server. The standard suggests using existing discovery and lookup infrastructures, for instance, JNDI API with an LDAP back end.

A new service added to JOnAS, the Discovery Service, allows JOnAS servers running over a LAN within the same management domain to communicate to each other the connector-server addresses they create at start-up. All the servers in the domain having the discovery service in the services list, will publish their connector-server address at start-up. The goal is to allow master servers to discover which servers are running in their domain, and to establish connections allowing them to remotely manage the slave servers by a management application deployed on a master server.

Starting with JOnAS 4.7, a server can be added to a domain via a management operation, thus allowing servers which cannot use the multicast-based discovery service to join a management domain.

The current discovery service implementation is based on MBeans (called discovery MBeans) which use:

J2EEDomain MBean

Domain management information can be retrieved from J2EEDomain MBean.

The J2EEDomain MBean has the following JMX ObjectName:

		domainName:j2eeType=J2EEDomain,name=domainName
	
Where domainName is the name of the domain.

A J2EEDomain MBean contains several management attributes and operations related to servers management in a domain:

Starting with JOnAS 4.7, the J2EEDomain MBean was enriched in order to support adding/removing a server to/from the domain, creating a cluster in the domain, listing the clusters in a domain.

The following is a list of some of the new management attributes and operations exposed by a J2EEDomain MBean:

In JOnAS 4.7, clusters are implemented as "sub-domains", they have associated J2EEDomain type MBeans. For example, if a cluster named clust is created in the domain named domainName, it has an associated MBean with the following JMX ObjectName:

		domainName:j2eeType=J2EEDomain,name=domainName,clusterName=clust,parentClusterName=domainName
	

MBeans for domain/cluster monitoring

An important re-engineering of domain management mechanisms was conducted in JOnAS 4.8 to support cluster and domain monitoring. Clusters aren't implemented as sub-domains anymore; there is only one J2EEDomain MBean registered in the master's MBean server. Another important point is that the servers' state is no longer accessible in the J2EEDomain MBean (getServerState(serverName) operation doesn't exist anymore). On the other hand, new MBeans were created:

Physical clusters

Logical clusters are created by the administrator to facilitate management administration on a group of servers. Physical clusters are created automatically if servers running in the domain have particular properties which depend on the cluster type.

How to start manageable servers in a Domain

The servers must adhere to these rules:

Also note the following:

Example

Consider a scenario in which there are three JOnAS servers named jonas, j1 and j2. Assume that they have discovery service configured with at least one of the servers playing the role of master.

How to define domain configuration using domain.xml file

A default domain configuration is provided in $JONAS_ROOT/conf/domain.xml. This configuration corresponds to a domain named jonas managed by a master server also named jonas. The location tag defines a JMX remote connector server URL for this server.