Java Reference
In-Depth Information
Figure 3.1
The JMXBookAgent in action
with the HTML adapter and
RMI connector.
nessed in chapter 2, you will be able to manipulate MBeans, add more MBeans,
and remove MBeans from an agent. In future examples, you will typically use the
HTML adapter for testing example MBeans by viewing and accessing their
attributes and operations.
3.1.2
Using the RMI connector
The RMI connector serves the same purpose as the HTML adapter: it allows out-
side clients to contact and interact with a JMX agent. The RMI connector you will
be using is provided by Sun Microsystems as a contribution to its JMX RI .
The RMI connector comes in two parts: a server and a client. The server part
resides with the JMX agent in order to provide access to the MBean server. The
RMI client resides with other client-side processes that wish to contact the JMX
agent. The RMI client shields users from having to write Java RMI code.
Figure 3.2 illustrates how the RMI connector can be used to create MBeans from
remote locations.
In future examples, you will use the RMI connector to interact programmati-
cally with your agent. Because the HTML adapter does not work with all class
types, you will sometimes need to access the agent via example code. In these
cases, you will use the RMI client.
For the purposes of this chapter, we won't discuss the features or API of the
RMI connector—we will only explain how to add it to the agent and use it.
Search WWH ::




Custom Search