Managing Apache Geronimo with JMX: Configuring, Managing, and monitoring Geronimo with JMX

Source: Internet
Author: User
Tags constructor resource

Apache Geronimo is built on a common reverse control (IoC) kernel that supports the JMX framework, which oversees a collection of managed components called Geronimo Beans (GBeans). Geronimo is created with JMX as the underlying kernel structure, and is somewhat similar to the JMX Managed Beans (Mbeans). The Apache Geronimo structure changes slightly over time because it uses JMX as a framework for locating objects, communicating between objects, blocking methods, and so on, so the framework is seen as an extension of jmx. However, there is still a clear legacy of JMX in the Geronimo architecture, especially in the GBean framework.

JMX has become the real standard for managing resources in the Java platform, Java 2 Platform, Enterprise Edition (Java ee), and Java Enterprise Edition. JMX defines a standard for dynamically compiling Java classes, interfaces, and Run-time objects using properties and operations for administrative purposes. JMX can develop and manage all resources (such as applications, devices, or services) that can be abstracted using the Java programming language. All managed resources are called MBean. JMX defines four types of MBean:

Standard MBean: Use the Java interface to define its administrative properties and operations.

Dynamic Mbeans: Use Run-time Discovery (Runtime Discovery) to define its administrative properties and operations.

Model Mbeans: acts as a proxy for objects that expose manageable actions and properties.

Open Mbeans: Use a predefined metadata glossary to expose the manageable properties and operations of classes and objects.

The main interface for interacting with Mbeans is javax.management.MBeanServer. Mbeanserver acts as a central repository for Mbeans and assists with Mbeans communication from the client. The Mbeans is uniquely identified by the ObjectName instance, and its components include:

A domain: Any name of a given domain. By convention, it is recommended that you use a reverse Domain Name System (DNS) to name the domain, in the same way that the Java package is named.

A list of key attributes: an arbitrary, unordered set of keys and their associated values.

Construct a typical objectname, as follows:

String domain = "com.jeffhanson.test";
String keyPropertyList = "Name=TestBean,Type=GenericService";
ObjectName objName = new ObjectName(domain + ":" + keyPropertyList);

You can use the ObjectName instance as a parameter to most Mbeanserver methods to retrieve properties and invoke actions on the MBean. For example, you can invoke an Mbean operation by invoking the Invoke method on the server by obtaining a reference to the Mbean server. When a reference to an MBean server is obtained, objectname represents the target object of the Invoke method, while the operation name is passed to the Invoke method as the second argument, followed by additional information that the MBean server needs to find and invoke the correct mbean. Geronimo still uses the ObjectName instance to refer to the GBeans in most methods that invoke GBeans.

JMX and its relationship to the GBean framework of Geronimo

Virtually every meaningful object in Geronimo is a GBean. The Geronimo kernel and other meaningful objects instantiated in the Geronimo platform are compiled into GBeans and exposed as JMX Mbeans, so tools that support JMX can manage them. This allows you to use standard portals, dashboards, and consoles to manage and monitor the running instances of Geronimo.

The GBeans in Geronimo exposes properties, actions, and notifications through the Gbeaninfo class and propagates that information to the JMX Mbeaninfo class. Figure 1 shows a high-level view of Geronimo and JMX relationships.

Figure 1. The relationship between Geronimo and JMX

Table 1 shows the similarities between the Geronimo GBeans and the JMX Mbeans.

Table 1. Similarities between Geronimo GBeans and the JMX Mbeans

mbeans use gbeans use
mbeaninfo structure
constructorinfo structure gconstructorinfo structure
information that encapsulates operations on managed resources GOPERATIONINFO structure
mbeanattributeinfo structure gattributeinfo structure
mbeannotificationinfo structure gnotificationinfo structure

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.