JMX Getting Started

zhaozj2021-02-17  54

JMX Getting Started

James Shen

Www.chenshen.com

Introduction

Java Management Extensions (JMX) is a set of management frameworks proposed by Sun. It defines a complete framework system, design mode, API interface, network-based management and monitoring services, etc., through which you can manage your Java program.

Advantages of JMX Management Framework

Let your program have the following advantages based on the JMX management framework:

n Make your Java application only to make the minimum change can be managed

The JMX management framework depends on the core management server. The so-called management server is similar to the agent, and we manage all controlled objects through it. This way we can make the program make the program to manage. Your Java application can even simply add several methods and register as a manageable object (MBean) to the JMX management server. This way you can use the standard interface provided by the JMX Management Framework to manage your Java application (for example, you can manage JMX).

n provides a scalable management framework

Every JMX proxy service is a separate module that can be loaded and uninstalled as needed. This component-based coupling way makes JMX solutions more flexible, regardless of the size of the program, is free to switch. The JMX Management framework provides a set of core services. All of these services can be dynamically added.

n integrated existing management solutions

JMX Intelligent Agent allows your application to be managed through an agreement between HTTP, SNMP, WBEM. And its API interface has become an open standard, and any other third-party manufacturers can be compatible with the JMX management framework.

N can make full use of standard Java technology already existing

At any time JMX Management Framework, you can refer to existing Java technology, such as Java Naming and Directory Interface? (JNDI), Java Database Connectivity (JAVA TRANSASE CONNECTIVITY, Java Transaction Services (JTS), etc.

n can adapt to future management concepts

The JMX Management Framework provides dynamic, scalable solutions, which can be compatible with a variety of different technologies through Java technology. For example: JMX solutions can take advantage of Jini? NetWork, Universal Plug'N'Play (Upnp), Service Location Protocol (SLP). Sun provides an example: Jini? NetWork technology offers a variety of services on the network, and is managed by JMX frameworks. The combination of this two techniques is referred to as Sun Spontaneous Management? Software

n Only the interface that must be managed by the management framework

The JMX framework is not designed for a distributed system. But it provides a number of services to accommodate distributed environments

JMX Management Framework Structure

JMX Management Framework is multi-layer structure:

N Instrumentation Level (Tools)

N Agent Level

N Distributed Service Level (Distributed Service Layer)

N Additional Management Protocol API (Other Management Protocol API)

INSTRUMENTATION Level

The tool layer provides specifications for manageable resources. The so-called manageable resources can be a Java application, an implementable service, a device or other. It relies on Java technology or packaged by Java technology, and it is like a tool (Instrument) can be managed by the JMX management framework. This manageable resource can be provided by one or more MBeans (manageable Beans), which can be standard or dynamic. Standard MBeans is a group of Java objects that follow specific design patterns (from the JavaBeans Component model), and dynamic MBeans can get more flexibility in the running period by implementing a particular interface. Managing resources for tool layers are managed by proxy layers, but there is no need to care about the agent layer when writing MBeans. MBeans hopes to be simple and easy to achieve so that developers can make it developed with manageability but do not need to pay attention to complex management solutions. The existing products are also easily converted into standard or dynamic MBeans resources, so that there is existing resources to be manageable at the lowest cost.

In addition, the tool layer also provides a special message mechanism for a NOTIFICATION. This mechanism allows MBeans to send asynchronous messages to other layers of components to implement communication functions. Because the tool layer consists entirely of design patterns and various interfaces, the reference implementation (RI) only provides examples to implement various MBeans and asynchronous messaging mechanisms. Therefore, the compatibility test (CTS) is only focused on whether various design patterns and interfaces are consistent with JMX specifications. Manageable resources can be automatically managed by JMX defined proxy layers, and can also be directly managed by MBean design and interface without passing the agent layer.

N agent layer (Agent Level)

The agent layer provides a proxy defined in the JMX specification. Monitor all resources of the application by directly managed by it. The agent is usually installed on the same machine to manage all resources, which can actually manage monitoring as different machines. The agency layer is constructed above the tool layer, which defines a standard agent to manage all resources. The standard JMX agent consists of a MBean server and a group of managed MBeans.

转载请注明原文地址:https://www.9cbs.com/read-29689.html

New Post(0)