|
[ Index ] [ Individual Project ] [ Placement Presentation ] [ Timetable ]
[ Index ] [ Research ] [ Schedule ]
The Java Management Extensions (JMX) defines an architecture, design patterns, APIs, and services for application and network management in the Java programming language.
It is divided into three different layers:
The JMX architecture
The instrumentation level is composed of a resource that is managed by one or more Managed Beans, or MBeans. There are several different types of MBeans, aimed at making the system practical to use by given a developer the largest choice of how to implement instrumentation of his or her components. The different type of MBeans are:
MBeans have several aspects in common. There is a naming convention (normally implemented only by standard mbeans since the other types are for classes that were not built with management in mind. The management interface is exposed through MBean metadata classes, either explicitly for implicitly. There is a notification and broadcast model that all mbeans follow.
Interface named MyClassMBean, which the class then implements. Since the management interface is defined in this manner there is no need to create the regular MBean metadata classes as the system can infer what they should contain.
DynamicMBean Interface. Since the management interface is determined by calling the getMBeanInfo method on the mbean, it can be altered dynamically at runtime.
Unlike the Java event model, Notification is the only class that can be sent as a notification, i.e. it does not use sub-classes as a way to interpret what type the notification was. The Notification class has a type field which contains the the type of the notification in standard 'dot-separated component' notation, e.g. jmx.mbean.registered. Other interfaces exist to all listeners to filter the types of notifications they receive.
N.B How notifications are transmitted to remote management applications is not covered in this phase of the specification.
The full specification of Open MBeans is not part of the JMX 1.0 specification. So it is unlikely that an implementations will contain the classes necessary to generate these types of MBeans.
Given that this project will most likely design a mbean to instrument a library jar, model mbeans are unlikely to be useful. Their concept may prove a useful base to design a generic dynamic mbean to allow the tool to be used with existed java libraries.
The JMX agent is a management entity that runs in the JVM and acts as a liaison between the mbeans and the management application. It is composed of:
Keys Concepts of the JMX Agent Architecture
The mbean server acts as the central registry for all the mbeans. All the management operations that are applied to the mbeans need to go through the server.
The services provided by the agent can either be the services specified in the JMX specification or those that are provided by third parties. The ones defined by the specification are:
A protocol adapter is to allow management applications that use a different protocol to manage these resources by providing a management view.
Connectors are used to allow remote JMX-enabled management applications to use the mbeans. The application would be developed using the JMX distributed services. The connector server will provide a remote interface to the mbean server. A connector is specific to a particular protocol, but the application can use any connector indifferently because they all provide the same remote interface.
N.B. Protocol adaptors and connectors are not covered in this phase of these specification, they are described here to provide a more complete overview of the agent's architecture.
The JMX architecture allows objects (agent-side or remote application) to perform the following operations on a JMX agent:
MBeanServer interface. An agent can have one or more servers and it provides a static factory to create them.
The key responsibility of the mbean server is to registry mbeans. It can achieve this by instantiating a new one and registering it immediately, or by registering an existing mbean. Once registered, the mbean server can perform the following operations on the mbean:
The remote interface for invoking operations on the mbean server have not been defined in this stage of the JMX specification. This will cause some sort of problems since it will force everything to be in the same JVM. Need to look at various implementations of JMX so far to see if they provide their own implementation of this important feature.
The MBeanServer provides methods for querying what mbeans are available. Details and examples can be found on pages 122-126 of the JMX specification.
To use the service you must provide a url to a m-let text file, which describes the various mbeans on the remote server. The syntax of this file is described on pages 128-130.
There are three provided monitor types, which are all derived from the same abstract Monitor class.
CounterMonitorGaugeMonitorStringMonitorCounter Monitor This type of monitor emits a notification when a certain threshold value for an attribute has been reached or exceeded. When the threshold has been met you can also make the monitor roll over (e.g. go back to zero) or add an offset (notify at every 10).
Gauge Monitor This monitor type is used on numeric attributes. It has two threshold values, high and low. It can be configured to emit a notification when ever an attribute goes above the high value or below the low value.
String Monitor
This monitors attributes of the type String. This monitor emits a notification when the attribute matches or differs from the monitor value. N.B. notifications are sent out over time so it is not just a one off monitor that always returns the notification.