Your SlideShare is downloading. ×
0
JMX Training
JMX Training
JMX Training
JMX Training
JMX Training
JMX Training
JMX Training
JMX Training
JMX Training
JMX Training
JMX Training
JMX Training
JMX Training
JMX Training
JMX Training
JMX Training
JMX Training
JMX Training
JMX Training
JMX Training
JMX Training
JMX Training
JMX Training
JMX Training
JMX Training
JMX Training
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 Training

2,297

Published on

http://www.Intertech.com …

http://www.Intertech.com

This is a slide deck from JavaOne by Intertech.

Published in: Technology, Business
0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,297
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
6
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

Transcript

  • 1. JMX & Your Systems Health
  • 2. A briefer history…(If its good enough for Hawking…)
    JSR 3
    Released in December of 2002
    JSR 160
    Released in October of 2003
    Added remote API for MBean Servers
  • 3. Terms
    Manageable Resource
    Any device, application, or entity that can be accessed or wrapped by Java.
    MBean
    Managed Bean – A Java class that implements elements of the JMX spec.
    MBean Server
    A Java class that manages a group of MBeans – the place you register your MBeans.
    JMX Agent
    A Java process that provides a set of services for managing MBeans – the container for the MBean server.
  • 4. Terms cont.
    Protocol Adaptors
    Provide a management view of the JMX agent through a given protocol, e.g. SNMP, HTTP
    Connectors
    Convey management operations transparently point-to-point over a specific protocol, e.g. RMI.
    Notifications
    Java objects published by MBeans and MBean servers to encapsulate events, alerts, or general information.
    Instrumentation
    The exposing of a manageable resource via an MBean.
  • 5. Architectural layers
    Instrumentation
    Allows for management of resources – your apps objects etc… via MBeans
    Agent
    Home of the MBean server, hosts all of your MBeans.
    Manager
    Provides the environment through which your MBeans talk to the outside world.
  • 6. Architectural layers
  • 7. Who’s using JMX?
    Major App Server Vendors
    JBoss
    WebLogic
    WebSphere
    ESB Vendors
    Sonic
    IBM
    JBI – Java Business Integration
    JSR 208
  • 8. Why JMX – why them-us-me?
    A cheap way to manage Java applications
    Bonus – it’s now part of JSE 5
    Will be supported by JEE 5
    If need be you can interrogate the JVM
    Short learning curve as compared to technologies like SNMP
    If you know basic Java principles and patterns you are close to writing your own MBeans
    Very component oriented
    Even the MBean Server is a component – they’re all components!
  • 9. Why JMX – why them-us-me? (cont.)
    Handy little features like
    Alerts
    Events
    Statistics
    Notification Model
    Broadcasters
    Listeners
  • 10. Why JMX – why them-us-me? (cont.)
    Services
    Timer MBeans
    Monitor MBeans
    Counter
    Gauge
    String
    Relations
  • 11. When to ponder?
    You can add JMX to a system anytime – but if you wait…
    It’ll require some refactoring
    Tends to not be woven into the fabric of the design
    Kinda like adding on that mother-in-law addition to the house…
    Best to do it early
    Consider support needs in requirements gathering
    What will you want to know as the system is running in production?
    Design for it
    Look at macro and micro picture
    From components, tiers, and system perspectives
    Can be an aid for unit and integration testing
  • 12.
  • 13. Plumbing for better health
    Instrumentation of key system resources
    Business process controllers
    Channels (queues)
    Data Accessors
    External interfaces
    Notifications of
    Threshold violations and near misses
    Almost a violation but not quite!
    Volumes
    Throughput
  • 14. Where to look -
    Tier interfaces
    Delegates
    Facades
    System infrastructure –foundational classes e.g.
    Exception handling – levels, counts
    Logging – file sizes
    Security – violation counts
    System Interfaces
    Gateways
    Endpoints
  • 15.
  • 16. What to look with
    MBeans – helpful little buggers
    Standard
    Dynamic
    Open
    Model
    Standard MBean
    Quickest to implement
    Most limited
    Model MBean
    Somewhat more complicated to work with
    Offer the most flexibility
  • 17. So how does this relate to real systems?
  • 18. Where to look - revisited
    Using the ‘real’ system on the previous slide, we’ll identify points of interest to instrument
    Each of those cute little graphics represents a business component – a candidate for instrumentation…
    What aspects of these subsystems do we care about once the app is in production?
    Lets highlight and talk about some of them.
  • 19. Where to look - revisited (cont.)
    E-commerce Website
    Number of hits an hour
    Average length of stay
    Shopping cart
    Number of active shopping cart instances in an hour
    Average length of time taken to process an order
    Check out
    Average length of time to process credit purchases
    Number credit purchases in a hour
    Shipping
    How many confirmed in an hour – reflects B2B integration point
  • 20. Why we’re looking
    We want to understand the systems performance so we gather stats on -
    Volumes of Units of Work (UOW) in subsystems
    E.g. Hits on the website
    The length of time that its takes to complete business processes
    E.g. The time to complete a credit transaction
    We want to know when we’re experiencing level of service issues so -
    Send alerts when preset thresholds are
    Exceeded - reactive
    Reach a percentage of capacity - preventive
  • 21. How to look -
    Gathering stats.
    package com.ecommerce.systemhealth
    public interface WebsiteMetricsMBean {
    public int getOrdersPerHour();
    }
    public class WebsiteMetrics implements WebsiteMetricsMBean {
    private int ordersPerHour;
    public void addToOrdersPerHour(int count){…}
    public int getOrdersPerHour() {…}
    }
  • 22. How to look -
    Sending alerts.
    package com.ecommerce.systemhealth
    public interface WebsiteAlertsMBean {
    public int areOrdersPerHourNearThreshold(int orders);
    }
    public class WebsiteAlerts extends NotificationBroadcasterSupport implements WebsiteAlertsMBean {
    public void areOrdersPerHourNearThreshold(int orders) {
    // check the new value against the threshold if exceeded
    sendNotification(notification);
    }
    }
  • 23. Ways to watch – management tools
    Part of the game
    Sun’s JConsole
    Open source
    XMOJO
    MX4J
    Generous Licenses
    MC4J
    EJTools JMX Browser
    Payware
    Wil-Co Cockpit – provides graphical front components for JMX services in a designer view.
  • 24. Who to tell and how?
    Staff in
    Application support
    Server support
    Integration support – B2B partners
    DBAs
    Let them know via
    Email
    Pager
    Monitoring control dashboards, e.g. Tivoli
  • 25. Some handy links
    http://java.sun.com/j2se/1.5.0/docs/guide/jmx/
    http://java.sun.com/products/JavaManagement/index.jsp
    http://java-source.net/open-source/jmx
    http://devresource.hp.com/drc/resources/jmxds/index.jsp
  • 26. Some books
    JMX in Action -- by Benjamin G. Sullins
    Java Management Extensions -- by J. Steven Perry
    I have both of the above, the first seems to be the most comprehensive
    Java and JMX: Building Manageable Systems -- by Heather Kreger

×