Download presentation
Presentation is loading. Please wait.
Published byAubrey James Modified over 9 years ago
1
Java Management Extensions (JMX) Jmx Introduction
2
JMX zWhat is JMX? zArchitecture yInstrumentation, Agent and Manager zJMX Components yMBeanServer yMBeans (Standard, Dynamic, Model) yNotification yAdaptors yConnectors zDevelopment Kits for JMX
3
JMX – What is it? z Sun - The Java Management extensions (JMX) provide a standard for instrumenting manageable resources and developing dynamic agents. zTom – JMX is a standard API and architecture for accessing and controlling Java classes.
4
JMX - Architecture z Instrumentation level - gives instant manageability to any Java technology- based object. z Agent level - agents are containers that provide core management services which can be dynamically extended by adding JMX resources. z 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 zMBeanServer - Contains the methods necessary for the creation, registration, and deletion of MBeans as well as the access methods for registered MBeans. zMBean – a class whose implementation exposes an interface for allowing management of its attributes and methods. yStandard yDynamic yModel
7
Standard MBean zA Standard MBean is a class that implements a custom MBean interface. yIt must be a concrete class so that it can be instantiated. yIt must expose at least one public constructor so that any other class can create an instance
8
Dynamic MBean zA Dynamic MBean implements its management interface programmatically, instead of through static method names. zRequires 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 zDynamic MBean that has been implemented so that its management interface and its actual resource can be set programmatically. zAccomplished by creating and registering the RequiredModelMBean with the MBeanServer and declaring the manageable resource (called the target object).
11
Model MBean (cont.) zA Descriptor contains the information describing the Model MBean’s target objects and the policies for accessing the target objects. zThe Descriptor is an interface which is implemented in the DescriptorSupport class.
12
Notification zMBeans, called broadcasters, send notification events to other registered MBeans or objects, called listeners. zTypical types of notification comes from the MBeanServer (register/unregister events) and MBeans (attribute changes). zAll notification events must implement the javax.management.Notification interface.
13
Adaptors zProtocol adaptors provide a view of the MBeans registered with a MBeanServer through some communication protocol. zTypically used to provide a user interface for managing the MBeans directly. zRun in the same process as the MBeans and MBeanServer zExamples: HTML or SNMP
14
Connectors zProtocol connectors and proxy MBeans allow for management of MBeans programmatically over a network. zConnector clients expose a remote version of the MBean server interface. The connector server transmits management requests to the MBean server and forwards any replies. zExample: RMI, HTTP or IIOP
15
JMX – Tool kits zJMX Reference Implementation – free core implementation of the basic JMX interfaces. zJava Dynamic Management Kit (JDMK) – Sun’s full implementation of the JMX specification. Includes HTML, RMI, and SNMP adapters. zA few others being developed. Will likely be standard in most application servers.
16
Resources zJMX Site - http://java.sun.com/products/JavaManagement/ http://java.sun.com/products/JavaManagement/ zJMX White Paper - http://java.sun.com/products/JavaManagement/wp / http://java.sun.com/products/JavaManagement/wp / zJavaWorld JMX article - http://www.javaworld.com/javaworld/jw-06- 2001/jw-0608-jmx.html http://www.javaworld.com/javaworld/jw-06- 2001/jw-0608-jmx.html zJDMK Site - http://java.sun.com/products/jdmkhttp://java.sun.com/products/jdmk
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.