Java Reference
In-Depth Information
Imagine that you decide to buy a new stereo. You go to the store, pick one out, and
bring it home. Are you the type of person who carefully unwraps everything,
checks the parts list, and follows the setup instructions step by step? Or do you
open everything and start figuring out all the connections on your own? This chap-
ter is written for those of you in the second group. If you fall into the first group,
please be sure to read chapter 1; it presents the need for the JMX framework, as
well as JMX 's overall architecture (which is only recapped here in chapter 2).
This purpose of this chapter is to familiarize you with the JMX Reference
Implementation ( RI ) provided by Sun Microsystems. After completing this chap-
ter, you will have managed your first resource, created a simple JMX agent, and
communicated with the agent from a web browser. In other words, you will create
an MBean, use the MBean server, and manage your MBean using the HTML
adapter provided by Sun in the JMX RI .
The remainder of the topic assumes that you already have the JDK 1.3 (at
minimum) installed on your machine and that you have it included in
your PATH . If necessary, you can download it from http://www.javasoft.com.
NOTE
2.1 Getting started
Before we get too far along, let's have a quick architectural review and create a
development environment.
2.1.1
A JMX architecture refresher
Chapter 1 detailed the JMX architecture and discussed how it provides a man-
agement solution. However, to ensure you get the most of this chapter, let's have
a brief refresher. The JMX architecture lays out a Java framework consisting of
three main parts, or layers, that work together to provide a Java management
solution. Table 2.1 lists the three layers of the JMX architecture.
Table 2.1
The three JMX component layers
Layer
Description
Instrumentation layer
Contains MBeans and their manageable resources
Agent layer
Contains the JMX agents used to expose the MBeans
Distributed layer
Contains components that enable management appli-
cations to communicate with JMX agents
Figure 2.1 illustrates how the layers work together.
Search WWH ::




Custom Search