JMX Basic Architecture JMX is divided into three layers, each responsible for handling different transactions. They are:

The Instrumentation layer The Instrumentation layer consists primarily of a set of interface definitions and specifications that describe how to develop MBeans. Typically, a resource managed by JMX consists of one or more MBeans, so the resource can be any component developed in the Java language, or a resource developed in another language wrapped in a JavaWrapper.

Agent layer Agent is used to manage the corresponding resources, and provide access to remote users interface. The Agent layer is built on top of the Intrumentation layer and uses and manages the components described inside the Instrumentation layer. The Agent layer mainly defines various services and communication models. At the core of this layer is an MBeanServer with which all MBeans must be registered before they can be managed. MBeans registered on MBeanServer do not communicate directly with remote applications; they communicate through protocol adapters and connectors. Agent usually consists of an MBeanServer and multiple system services. The JMX Agent does not care what the resources it manages are.

The Distributed Layer The Distributed layer cares about the details of how the Agent is accessed by remote users. It defines a set of interfaces and components used to access the Agent, including the description of the Adapter and Connector. If a Java object can be managed by a JMX-compliant manager application, then the Java object can be managed by JMX. To make a Java object manageable, you must create the corresponding MBean objects and manage the corresponding Java objects through these MBean objects. Once you have the MBean class, you need to instantiate it and register it with the MBeanServer.

JMX is already included in JDK7, but if you use the HtmlAdaptorServer class (as you’ll see later), you’ll also need jmxtools.jar. You can download it here. There are two packages: jmx-1_2_1-ri.zip; _0_1_03 jmx_remote – 1 – ri. Zip. JMX-1_2_1-ri.zip contains jmxri.jar and jmxtools.jar. Copy jmxtool.jar and place it in the classpath (jmxri.jar is included in the JDK5+ package).

Pay attention to the WeChat official account of “Power Node Java Institute”, and get more valuable information about Java. The most important thing is that the Java Zero Foundation Class of Power Node Java Institute is now open for free learning, which is undoubtedly good news for students who want to learn Java. To personally inspect the teaching quality, the opportunity is just around the door.