1 / 16

Java Management Extensions (JMX)

Java Management Extensions (JMX). Jmx Introduction. JMX. What is JMX? Architecture Instrumentation, Agent and Manager JMX Components MBeanServer MBeans (Standard, Dynamic, Model) Notification Adaptors Connectors Development Kits for JMX. JMX – What is it?.

Télécharger la présentation

Java Management Extensions (JMX)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Java Management Extensions(JMX) Jmx Introduction

  2. JMX • What is JMX? • Architecture • Instrumentation, Agent and Manager • JMX Components • MBeanServer • MBeans (Standard, Dynamic, Model) • Notification • Adaptors • Connectors • Development Kits for JMX

  3. JMX – What is it? • Sun - The Java Management extensions (JMX) provide a standard for instrumenting manageable resources and developing dynamic agents. • Tom – JMX is a standard API and architecture for accessing and controlling Java classes.

  4. JMX - Architecture • Instrumentation level - gives instant manageability to any Java technology-based object. • Agent level - agents are containers that provide core management services which can be dynamically extended by adding JMX resources. • Manager level - provides management components that can operate as a manager or agent for distribution and consolidation of management services.

  5. JMX - Architecture

  6. JMX Components • MBeanServer - Contains the methods necessary for the creation, registration, and deletion of MBeans as well as the access methods for registered MBeans. • MBean – a class whose implementation exposes an interface for allowing management of its attributes and methods. • Standard • Dynamic • Model

  7. Standard MBean • A Standard MBean is a class that implements a custom MBean interface. • It must be a concrete class so that it can be instantiated. • It must expose at least one public constructor so that any other class can create an instance

  8. Dynamic MBean • A Dynamic MBean implements its management interface programmatically, instead of through static method names. • Requires implementing the JMX interface java.management.DynamicMBean

  9. DynamicMBean Interface public interface DynamicMBean { public Object getAttribute(String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException; public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException ; public AttributeList getAttributes(String[] attributes); public AttributeList setAttributes(AttributeList attributes); public Object invoke(String actionName, Object params[], String signature[]) throws MBeanException, ReflectionException ; public MBeanInfo getMBeanInfo(); }

  10. Model MBean • Dynamic MBean that has been implemented so that its management interface and its actual resource can be set programmatically. • Accomplished by creating and registering the RequiredModelMBean with the MBeanServer and declaring the manageable resource (called the target object).

  11. Model MBean (cont.) • A Descriptor contains the information describing the Model MBean’s target objects and the policies for accessing the target objects. • The Descriptor is an interface which is implemented in the DescriptorSupport class.

  12. Notification • MBeans, called broadcasters, send notification events to other registered MBeans or objects, called listeners. • Typical types of notification comes from the MBeanServer (register/unregister events) and MBeans (attribute changes). • All notification events must implement the javax.management.Notification interface.

  13. Adaptors • Protocol adaptors provide a view of the MBeans registered with a MBeanServer through some communication protocol. • Typically used to provide a user interface for managing the MBeans directly. • Run in the same process as the MBeans and MBeanServer • Examples: HTML or SNMP

  14. Connectors • Protocol connectors and proxy MBeans allow for management of MBeans programmatically over a network. • Connector clients expose a remote version of the MBean server interface. The connector server transmits management requests to the MBean server and forwards any replies. • Example: RMI, HTTP or IIOP

  15. JMX – Tool kits • JMX Reference Implementation – free core implementation of the basic JMX interfaces. • Java Dynamic Management Kit (JDMK) – Sun’s full implementation of the JMX specification. Includes HTML, RMI, and SNMP adapters. • A few others being developed. Will likely be standard in most application servers.

  16. Resources • JMX Site - http://java.sun.com/products/JavaManagement/ • JMX White Paper - http://java.sun.com/products/JavaManagement/wp/ • JavaWorld JMX article - http://www.javaworld.com/javaworld/jw-06-2001/jw-0608-jmx.html • JDMK Site - http://java.sun.com/products/jdmk

More Related