Download presentation
Presentation is loading. Please wait.
Published byPriscilla Wade Modified over 9 years ago
1
Original work by David Moran JMX Update Scott Molenaar ScottMolenaar@null.net 11/08/2004
2
Original work by David Moran Original Slides Created by David Moran dmoran@nc.rr.com 10/20/03
3
Original work by David Moran Agenda Overview Managed Beans Services Remote API J2EE Management Implementations Future Directions Demo
4
Original work by David Moran Benefits JMX is an API to for managing java applications. Abstract the instrumentation for management information to a common interface to facilitate integrated management. Distribute management by moving management functions to the agents. Real-time deployment of services and updates. Possible to use to manage any application or device (via JNI or SNMP etc..)
5
Original work by David Moran JMX Architecture
6
Original work by David Moran MBeanServer The core of the agent. It provides a registry for MBeans. Allows clients to discover and execute operations exposed by the MBeans Makes available various services to facilitate management (I.e. monitoring, scheduling, etc) Use “ObjectName” class to register objects with the MBeanServer
7
Original work by David Moran Instrument your resources as MBeans MBean stands for “managed bean” MBeans can represent a physical device or an application You decide which attributes and methods you want to expose for management. Use design patterns similar to JavaBeans MBeans are exposed in an agent.
8
Original work by David Moran Standard MBeans The simplest MBean Provides a static representation of a manageable resource. Implements a management interface of attributes and methods that a device or application exposes for management.
9
Original work by David Moran Notifications Can be used to inform registered listeners with important events or state changes. Similar to the java event model Register once to all types of notifications Can supply a filter to say which notifications it is interested in.
10
Original work by David Moran Dynamic MBeans Useful if the management interface is not stable. The management interface is defined at runtime. Developer is responsible for checking the validity of the invocations.
11
Original work by David Moran DynamicMBean Interface > DynamicMBean getAttribute(String attribute) setAttribute(Attribute attribute) getAttributes (String[] attributes) setAttributes(AttibuteList attributes) getMBeanInfo() invoke(String actionName, Object[] params)
12
Original work by David Moran Model MBeans Most flexible and thus most complicated MBeans Extension of the dynamic MBean Developers do not write an MBean class The agent must supply the RequiredModelMBean and the Management Interface is defined outside of the Bean via setter methods. Features include persistence, logging, and attribute caching.
13
Original work by David Moran Connectors/Adapters A connector makes a Java Management Extensions (JMX) API MBean server accessible to remote Java technology- based clients. Adapters are similar to connectors except they provide protocol translations (I.e. SNMP, HTML, etc.)
14
Original work by David Moran Agent Services Mlet; (Management Applet) Dynamically adds class files to the server either locally or from a remote location. Relation Service; Allows the definition of relationships between MBeans Monitors: Observe MBean attributes and emit notifications when values change. Timers: Emits user defined notifications at specific times.
15
Original work by David Moran JMX Remote API Adds remote capability to the JMX spec Makes the JMX agent accessible from outside the JVM. Developed through the JCP JSR 160 Standard support via RMI Optional support via TCP Sockets (JMXMP) API is as close as possible to the API defined by the JMX API. Also support discovery/lookup services and defines security between the client and server. As with RMI code must handle communication exceptions
16
Original work by David Moran J2EE Management An MBean can get data directly from an EJB by invoking its access methods. An MBean can receive data being pushed from an EJB. Registers and Deletes an MBean with a JMX agent upon creation and destruction of an EJB
17
Original work by David Moran J2EE Management Spec JSR77 This specification represents a model of the J2EE application server, and its subcomponents, that all J2EE-compliant application vendors are required to expose Requires JMX Part of J2EE 1.4 spec Specifies the MEJB, which is a session bean, to expose the agent to remote clients.
18
Original work by David Moran Available JMX Implementations Sun JDK1.5 JBOSS JBOSS-MX MX4J XMOJO Commercial implementations available; Weblogic Adventnet XtreamJ WebSphere Tivioli
19
Original work by David Moran Future Directions Use of metadata Persistence Reliable event handling Master-agent/sub-agent functionality Manageability for J2EE™ apps
20
Original work by David Moran Examples MX4J - Dynamic MBean Example (CacheMBean) MC4J Console XMOJO - Model MBean Example (ServerInfo) XMOJO Web based console JBoss – “XMBean” Example (CacheMBean) JBoss Web based console & MC4J Console JDK1.5 Standard MBeans and JConsole
21
Original work by David Moran Books JMX in Action Benjamin G. Sullins, Mark Whipple Publisher: Manning Publications Company Benjamin G. SullinsMark Whipple JMX: Managing J2EE with Java Management Extensions Marc Fleury, Juha Lindfors Marc FleuryJuha Lindfors Publisher: Sams Java and JMX: Building Manageable Systems Heather Kreger, Ward K. Harold, Leigh Williamson, Ward Harold Publisher: Pearson Education Heather KregerWard K. HaroldLeigh Williamson Ward Harold Java Management Extensions J. Steven Perry J. Steven Perry Publisher: O'Reilly & Associates, Incorporated JMX Programming Mike Jasnowski Publisher: Wiley, John & Sons, Incorporated Mike Jasnowski
22
Original work by David Moran References Sun JMX Page: http://java.sun.com/products/JavaManagement http://java.sun.com/products/JavaManagement JMX Forum jmx-forum@java.sun.com jmx-forum@java.sun.com JBOSS MX: http://www.jboss.org/developers/projects/jboss/jbos smx.jsp http://www.jboss.org/developers/projects/jboss/jbos smx.jsp AdventNet: www.adventnet.comwww.adventnet.com http://www.gartner.com/reprints/adventnet/108841.html Interview with Chris Ebro http://www.theserverside.com/events/library.jsp http://www.theserverside.com/events/library.jsp JSR77 Article http://www.onjava.com/pub/a/onjava/2002/03/27/jsr77.html Original Slides http://www.trijug.org/downloads/JMXPresentation.ppt http://www.trijug.org/downloads/JMXPresentation.ppt
23
Original work by David Moran References continued MX4J Page: http://mx4j.sourceforge.orghttp://mx4j.sourceforge.org MC4J Page: http://mc4j.sourceforge.orghttp://mc4j.sourceforge.org XMOJO Page: http://www.xmojo.org http://www.xmojo.org Jconsole page: http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/ jconsole.html http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/ jconsole.html Tutorial Page: http://www.admc.com/blaine/howtos/jmx/jmx.html http://www.admc.com/blaine/howtos/jmx/jmx.html Article on JMX: http://www.onjava.com/pub/a/onjava/2004/09/29/ti gerjmx.html http://www.onjava.com/pub/a/onjava/2004/09/29/ti gerjmx.html
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.