41.2. Mechanisms Used by Domain Management

Basically, domain management in JOnAS relies on the JSR 160 specification. When a JOnAS server is started, it creates at least one JSR 160 connector server as described in Chapter 35 Howto: 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 a LDAP backend.

Currently 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 the remote management of the slave servers by a management application deployed on a master server.

In the future, the discovery service will evolve towards a more standard implementation in order to allow remote management of servers running on hosts connected to a WAN.

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

Domain-management information can be retrieved from the J2EEDomain MBean and from the JMX service implementation object. Indeed, both J2EEDomain MBean and JmxServiceImpl instances listen for JMX notifications sent by discovery MBeans.

41.2.1. 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 the following management attributes and operations:

In order to administer a given server in the domain, any management application has to create an MBeanServerConnection object using one of the connector server addresses corresponding to that server (see the j2eemanagement sample).

41.2.2. Domain Management Information in JMX Service

The JMX service, as the J2EEDomain MBean, implements mechanisms that update information about the servers running in the current domain and creates ready-to-use MBeanServerConnection connection objects. The JonasAdmin application, for example, uses these connection objects via the JonasManagementRepr helper class.