Java Reference
In-Depth Information
You had your first exposure to working with an MBean server by using the
HTML
adapter you registered on the server. Previous chapters reminded you how
JMX
uses protocol adapters and connectors to enable a
JMX
agent for use by the out-
side world.
You studied the overall agent architecture in chapter 1 and explored the
MBean server in greater detail in chapter 8. This chapter covers another compo-
nent of
JMX
agents: protocol adapters and connectors. In this chapter, we will
discuss two connectors that will enable you to distribute your agents across a net-
work using Java Remote Method Invocation (
RMI
) and the Jini network technol-
ogy. We will also spend some time discussing using
TCP
and Simple Network
Management Protocol (
SNMP
) to enable access to
JMX
agents.
By allowing clients of your agent to contact the agent from remote locations,
you greatly increase the agent's usefulness. By using connectors and adapters,
you can collocate agents with managed resources and contact them from remote
locations. Thus you can use web browsers, hand-held devices, and so forth to stay
in contact with your managed resources.
As previously mentioned, such remote communication is particularly useful
in a monitoring context. You can install a
JMX
agent in a hosted application
environment and stay in communication with it over your network. This ability
lets you maintain reliable, real-time status. Figure 9.1 depicts this scenario; you
should recognize components of this figure from previous chapters.
Figure 9.1
Contacting a JMX
agent with a remote
client by using a
connector