Java Reference
In-Depth Information
This chapter is the first of three chapters that discuss the standard JMX agent
services. In this chapter, you will find coverage of a JMX agent's ability to create
MBeans from dynamically loaded class files from remote locations.
When developing a Java application intended to run for an extended period
of time, you have probably encountered the need to restart the application to
include new classes in its CLASSPATH . In fact, think of any JMX agent that is run-
ning: you'll need to add MBeans of a new class type currently not in the agent's
codebase. The Management Applet (M-let) service was designed to solve this
problem, as well as to provide other useful functionality.
Dynamic MBean loading, provided via the JMX M-let service, allows the
agent, other MBeans, and management applications to create MBeans by down-
loading class files from remote locations. In addition, the M-let service lets
agents expand their codebase at runtime.
10.1 Understanding the M-let service
Consider the situation of a JMX agent serving as a monitor to hosted applications
in the same environment. Now imagine that you add more applications to the
hosted environment, and that, for monitoring purposes, they require very special-
ized MBeans. Due to the nature of the applications already being monitored, you
don't want to restart your JMX agent. Figure 10.1 illustrates such an environment.
How can you make the new MBeans available to the agent without having to
first stop the JMX agent and update its CLASSPATH in order for new MBeans class
types to be loaded? In addition, you may need to add other classes to the agent's
codebase without creating MBeans. Simply use the agent's dynamic class-loading
service: the M-let service.
Figure 10.1
JMX agent monitoring applications
Search WWH ::




Custom Search