Use JMX development component architecture (translation)

zhaozj2021-02-16  61

Sun Development Java Management Extensions (JMX) has been several years, previously referred to as JMAPI, recently become a basic architecture of J2EE servers with the combination of the J2EE management platform. JMX allows you to centrally manage those managed Beans, also known as MBeans, which can be applications, components, resources, etc. in distributed networks. This feature is provided by a MBean server, all MBeans are registered by this server and open the managed interface. In addition, JMX also includes a service called M-LET that allows the MBeans to be dynamically loaded through the network. In JMX's architectural model, the MBean server is the core of all inserted service components, and other MBeans can be found through the notification mechanism of the MBean server. The MBean server itself is light, so some of the most important basic server structures are used as MBeans. Model, add to the core of the MBean server, such as the protocol adapter is a implementation of MBeans, they can receive client requests from different network protocols (icons SNMP, WBEM) through the network, can also use tools to manage JMX-based servers These tools can be developed in any programming language. So this is a server system that is modular, and it is easy to manage and configure such a server through some different types of tools. Why is JMX to correspond to enterprise Java developers? As an enterprise Java developer, you may be curious about how companies should use and apply JMX there. JMX and MBeans technology help the server development, from this perspective, their impact on developers is relatively small. But there are still many reasons to let you create your own MBeans. Let's take a look at the class of servers custom and start. Each type of application server provides a different private interface to facilitate the addition of custom classes, sometimes called "startup classes", when the server has not entered J2EE mode, they often used to perform some tasks: Initialization of resources; increasing the function of maintenance and monitoring; call and arrange batch processing. The problem with this server class is that they fully load itself into the server's boot sequence, which makes your application directly and a specific J2EE vendor bind together. Such applications and server startup classes make you lose the benefits of J2EE moving implant, and if you want to change your application server, it will become more expensive and more difficult. For the above problems, the JMX system provides a clear solution. Since the MBean server and registration have been defined by JMX specification, any compatible MBean can be registered to a compatible MBean server. This is for an application server that implements JMX and its standard extension interface. Since MBeans is portable, JMX-based application servers also add to the movable implant of your application, you will not need to rely on private The server interface. Make management more easily based on another benefit of JMX servers is to manage custom components at runtime, which means you can use the advantages of common management tools, including those provided by the application server provider. This way you don't have to be drowning in a constantly growing hard management profile. Suppose an application must collect summary information of the database daily, and send the information to a predetermined email address, because the J2EE model does not define the timer, and does not allow components to manage system resources such as threads, as a programmer can only be attached to This server's custom class is completed. In order to be able to make the application still portable, the programmer can create a MBean for this app and add it to the JMX MBean server.

Standard MBEANs illustrate those manageable properties and operations (methods). For example, there may be an operation to set the database summary and the information of the E-Mail notification interval. By exposing such an operation in the interface of the MBean, developers may make the administrator to change the interval of the notification at runtime. Never need to edit your cumbersome, unknown profiles, and do not need to restart the server in order to enable modifications. In order to facilitate the development of universal manageable interfaces, standard MBeans properties and operations are named with JavaBeans. Administrators can display and call exposed operations and properties through a web browser. For example, the JMX reference implementation of Sun implements a web client interface. In terms of management, as long as MBean developers expose the properties and operations that can be used, then when you add a new custom component to your server, those components will be automatically valid in the customer interface when he can run. This is a very useful feature. The current work is to define a standard model for J2EE management in the Sun community (JSR77). One of these experts is to have a single management tool to manage multiple manufacturers that implement J2EE platforms. JMX enables a way to meet this demand. The benefits of the component server system J2EE platform is based on service. There are many APIs in the J2EE field to adapt to CORBA services. It seems that all platform services that use JMX server integration and managing all platform services are very natural. For example, if you need to speed up the response time or small range coverage (Small Footprints) in the embedded application, you can install the intravation cache or open your persistent engine. If you are as required by an ASP application, you can configure the container as required, and the customer is logged in to configure it, then you can load the service by using the M-LET dynamic component. Most commercial developers face the fear of developing and integrating all J2EE tasks, some servers, such as WebLogic, using this single-type approach .jboss as an open source server, adopted Another different approach is to integrate different modules as JMX MBeans. This is easy to assemble the J2EE by mixing the J2EE, even the independent module. JBoss makes full use of JMX semantics as a development platform and provides a complete J2EE platform through JMX integration. MBeans wraps the most basic J2EE service: Servlet, JSP, EJB, O / R, Naming, JTS / JTA, JMS, SOAP, and other third-party modules. JBoss did not limit JMX to management, and he also took JMX as a means of automatic integration of open source tools. Through complete modularization, JBoss developed the JMX architecture of the next generation J2EE server. To other J2EE vendors want to do the same, dynamic configuration, they must also be done in accordance with the JMX system, not just a management interface. For service-based frameworks, JMX is a natural architecture, and is the only means that can provide clear management in operation and development. Modularization grows in an open source product is not just a good idea in open source, and is also a method of maturing project. Successful open source projects are usually measured by a large number of participants. Generally speaking, the core team developing core functions, but with the growth of the base code, a large number of developers are allowed to develop on the core module. When JBoss1.0 is completed, the core developers will come out soon: It is difficult to participate in an accidental (unfamiliar) developer, and there is no week training, it is difficult to see of. Before a person participated in the development, it would have to spend at least one week time to be familiar with the code. This state is the feature of the second generation of open source projects: a large number of developers are involved, but as long as a very small number of people can make some substantive things.

In the third iteration, JBoss uses JMX. Within one week, a SOAP call interface is submitted to the JBoss development group. The development and management of open source needs to be modular. JMX is a natural way to implement modularization when designing. JBoss and JMX are successful from the growth of the product growth and the easy integration of the service components. About the Author: (. Ph.D) Marc Fleury, Ph.D., JBossGroup's CEO, is the founder of JBoss open source projects. Juha Lindfors is a computer expert in Helsinki University.

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

New Post(0)