JMX, short for Java Management Extensions, is a framework for building Management capabilities into applications. Users can use these agents and service implementations for administration in any Java application.
1. JMX Architecture Diagram
As can be seen from the figure, the structure of JMX is divided into three layers:
1. Base layer: mainly MBeans, managed Java beans
MBeans are of the following three types: Standard MBeans: This type of MBean is the simplest, and the resources it can manage (including properties, methods, and times) must be defined in an interface that the MBean must then implement. It must also be named according to certain conventions. For example, if our MBean is Hello, the interface must be HELLOMBean. Dynamic an: must implement the javax.mail. Management. DynamicMBean interface, all the properties of the methods are defined in the runtime model an: Compared with the standard and dynamic an, you don't have to write an class, just use javax.mail. Management modelmbean. The RequiredModelMBean can. RequiredModelMBean implements the ModelMBean interface, and ModelMBean extends the DynamicMBean interface, so, like DynamicMBean, the management resources for ModelMBean are defined at run time. Unlike DynamicMBeans, where the resources managed by DynamicMBeans are defined in DynamicMBeans (which resources are managed at runtime), the resources managed by Model MBeans are not in the MBean, but external (usually a class), and only at runtime. It is then added to the Model MBean through the set method.
2. Adaptation layer: MBeanServer, which provides the registration and management of resources; 3. Access layer: provides the entrance for remote access
application
Tomcat listens for access requests from different clients