Your SlideShare is downloading. ×
JMX
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

JMX

2,380
views

Published on

Published in: Technology

0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,380
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
0
Comments
0
Likes
4
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • Figure 1.1 An environment with many applications that need management. Each has its own set of configuration and management tools.
  • Figure 1.2 An environment with many applications that need management. Each is represented by its own MBean and managed through a single management tool using any number of protocols or transports. The three JMX layers are delimited by dotted lines.
  • Services are themselves MBeans Relation Service: phone system – to disable one device you need to disable it and remove it from routing table Mlet: you can’t stop a monitoring application and you want to add more MBeans at runtime.
  • Transcript

    • 1. Presented by Haitham Raik Java Management Extension (JMX)
    • 2.
      • Overview.
      • Benefits.
      • JMX Architecture.
      • MBeans.
      • Standard MBeans.
      • MBean Server.
      • JMX Agents.
      • JMX Remote API.
      • J2EE Management.
      • JMX API Versions.
      • Available JMX Agent Implementations.
      • JMX Managers.
      • Demo.
      Agenda
    • 3.
      • JMX is an API for managing java applications.
      • Defined by JSR 3 (JMX API) and JSR 160 (JMX Remote API).
      • Standard in J2SE and J2EE 1.4 specifications.
      • Can be used for
        • Management of running applications, for example: changing configuration settings.
        • Monitoring of running applications, for example: obtaining statistics and error notifications.
      Overview
    • 4.
      • Easy of use.
      • Leveraging existing technologies.
      • Componentization.
      • Alerts, events, and statistics.
      • Rapid monitoring solutions.
      Benefits
    • 5. JMX Architecture
    • 6. JMX Architecture (cont.)
    • 7. JMX Architecture (cont.)
    • 8.
      • MBean stands for “managed bean”.
      • MBeans can represent a resource:
        • Application configuration settings.
        • Program module.
        • User identity.
        • Device.
      MBeans
    • 9.
      • MBeans provide:
        • Information about resources using attributes that can be read and/or written.
        • Operations that can be invoked on resources.
        • Notifications that the MBean can send.
      • Use design patterns similar to JavaBeans.
      • The instrumentation layer of the JMX architecture is all about MBeans.
      MBeans (cont.)
    • 10.
      • MBean example:
      MBeans (cont.) CacheControlMBean size: int RW used: int R Attributes save(): void dropOldest(int n): int Operations “ com.b1me.cache.full” Notifications
    • 11.
      • The simplest way to define an MBean.
      • Create a java interface called Something MBean that defines the MBean attributes and operations.
      • Create a java class called Something that implements that interface.
      Standard MBeans
    • 12. Standard MBeans (cont.)
    • 13. Standard MBeans (cont.)
    • 14.
      • The core of the agent. It provides a registry for MBeans.
      • Allows clients to discover and execute operations exposed by the MBeans.
      • Each MBean is registered with its ObjectName.
      • You can have more than one MBean server per JVM
      • But usually everyone uses the Platform MBean server
        • ManagementFactory.getPlatformMBeanServer();
      MBean Server
    • 15.
      • Registering your MBean
      • // MBeanServerFactory.createMBeanServer()
      • MBeanServer mbs =
      • ManagementFactory.getPlatformMBeanServer();
      • ObjectName name =
      • new ObjectName( “ com.example : type=CacheControl ” );
      • CacheControl cc = new CacheControl(cache);
      • mbs.registerMBean(cc, name); // createMBean
      MBean Server (cont.) Domain one or more key properties
    • 16.
      • JMX Agent is the container for an MBean server.
      • JMX Agent provides a set of services for managing a set of MBeans:
        • 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.
        • Mlet: dynamically adds class files to the server either locally or from a remote location.
      JMX Agent
    • 17.
      • Add 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 connector.
      • Optional support via TCP.
      • Also support lookup services and defines security between the client and server.
      JMX Remote API
    • 18.
      • Connector: makes MBean server accessible to remote java technology based clients (e.g., RMI).
      • Adaptor: makes MBean server accessible via protocol transalations (e.g., HTTP, SNMP).
      JMX Remote API (cont.)
    • 19.
      • Example:
      • HtmlAdaptorServer adapter =
      • new HtmlAdaptorServer();
      • ObjectName adapterName =
      • new ObjectName ( “module1:name=htmladapter,port=9092“ );
      • adapter.setPort( 9092 );
      • mbs.registerMBean( adapter, adapterName );
      • adapter.start();
      JMX Remote API (cont.)
    • 20.
      • “ write once run anywhere”.
      • It was difficult to manage j2ee applications on different Application Servers.
      • “ write once manage anywhere”.
      J2EE Management
    • 21.
      • It is based on JMX specification.
      • Part of j2ee 1.4 specification.
      • MEJB is a session bean to expose the agent to remote clients.
      J2EE Management (cont.)
    • 22.
      • JSR 3 defined the JMX API, version 1.0
        • Maintenance reviews defined versions 1.1, 1.2
        • Version 1.2 is what’s in j2se 5.0 and j2ee 1.4
      • JSR 160 defined the JMX remote API, version 1.0
        • Version 1.0 is what’s in j2se 5.0
      • JSR 255 merges and updates JSR 3 and 160
        • It will introduce JMX API version 2.0 in j2se 7.0
        • Intermediate version 1.3 in j2se 6.0
      JMX API Versions
    • 23. JMX API Versions (cont.)
    • 24.
      • Sun JMX 1.2.1 and Remote API 1.0 RI.
      • JDMK 4.2 from Sun Microsystems.
      • TMX4J 1.0 from Tivoli Systems.
      • AdventNet Agent Toolkit Java/JMX Edition.
      • AdventNet ManageEngine.
      • MX4J.
      Available JMX Agent Impl.
    • 25.
      • Tivoli Web Component Manager.
      • Dirig Software.
      • AdventNet Middleware Manager.
      • AdventNet Web NMS.
      • Vigor Soft hawkEye.
      JMX Managers
    • 26. Demo
    • 27. Thank you Java Management Extension (JMX)

    ×