The content of this guide is the following:
This guide is intended for JOnAS administrators responsible for the configuration and administration of JOnAS servers running within a management domain.
A JOnAS management domain is composed of a set of JOnAS servers that are running under the same management authority and are identified by a domain name.
The servers in a domain can be administered by a management application running on one server (or several) in the domain; this is the role of administrator or master. The managed servers play the role of slaves.
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 servers in the domain.
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 a LDAP back end.
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 them to remotely manage 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:
J2EEDomain
MBean and from the JMX service
implementation object. Indeed, both J2EEDomain
MBean and JmxServiceImpl
instances
are listeners of JMX notifications sent by discovery MBeans.
The J2EEDomain
MBean has the following JMX ObjectName:
domainName:j2eeType=J2EEDomain,name=domainNameWhere domainName is the name of the domain.
A J2EEDomain
MBean contains the following management attributes and operations:
J2EEDomain
is registered in a master server's MBean server, the servers
attribute keeps the list of the servers running in the domain. Otherwise, it contains only one element corresponding to itself.
The elements in the servers list are Strings representing J2EEServer
ObjectNames
associated to the running servers. By iterating over the servers
list, a management application can determine the name of the servers in the domain.
MBeanServerConnection
object
using one of the connector-server addresses corresponding to that server (see the j2eemanagement
sample).
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.
The servers must obey these rules:
Also note the following:
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.
jonas start
jonas start -n j1 -Ddomain.name=jonas
jonas start -n j2 -Ddomain.name=jonas