Monitoring using the OUAF Part 2: JMX

One of the recent additions to the OUAF is the ability to use JMX to help monitor and administrate the product. A bit of background first, JMX stands for Java Management Extensions. It provides a standard way of accessing and manipulating internal information involved in the operations of java based technology. For more information about the potential and the scope of the API see the standard Sun JMX documentation.

This entry will concentrate on how to enable JMX and extract information.

By default, JMX is not enabled in Java 5 (I heard that Java 6 may have it enabled by default but I have not found anything confirming that). To do this you have to add some options to the java command line. The details of the command line options available (and there are a few combinations) are document at the Sun JMX site.

This can be enabled in the OUAF in the following areas:

  • Online/XAI - You can add the options in the J2EE console (if the command line is visible) or modifying the scripts that start the J2EE Web Application Server.

  • Batch - You can add the options in the threadpoolworker options. Refer to the documentation for details of this. Note: This is only supported in V2.2 and above only.

When you enable it, the JMX information is available on a port that broadcasts the information. This port can be secured or not (part of the enabling process configures the port and the security). Remember that JMX is not only for monitoring but MANAGEMENT so it should be secured to avoid the wrong people controlling the applications.

The next step is to point a JMX browser to the port to display the relevant JMX information. For publishing purposes the JMX browser used will be jconsole for examples. It is the one provided with the Java SDK but you can use similar techniques on other JMX browsers such as Enterprise Manager, Tivoli and MC4J etc.

You can start the JMX console using the jconsole command. If you want to monitor C3P0 connection pools then you should ensure that C3P0 java classes are in the path:

cd $C3P0_JAR_DIR
jconsole -J-Djava.class.path=$JAVA_HOME/lib/jconsole.jar;$JAVA_HOME/lib/tools.jar;c3p0-

Now once you open the browser you will see a tree of statistics. Each of the entries in the tree is a JMX collection point that provides statistics. These statistics vary from class to class but provide valuable statistics in the "Attributes" section.

If you are looking for batch statistics then you should review the Batch Operations Guides on Metalink 753301.1 which outlines the statistics available.

If you are looking at online statistics then you should review the Operations and Configuration Guides on Metalink 753303.1 which outlines the statistics available.

If you are looking at C3P0 statistics then you should review the C3P0 site for details.

You can also get detailed Java 5 statistics from the JMX then look at the following example.

Take time to explore the statistics available and you can even configure your console to track and display the information.


Yo, ta for posting this, I was just wondering if you knew, or could send me a url towards badger population in England? Oh, and how could i sign up to the blog? Thanks again!

Posted by Bird Watching on January 11, 2011 at 01:55 AM EST #

Post a Comment:
  • HTML Syntax: NOT allowed

Anthony Shorten
Hi, I am Anthony Shorten, I am the Principal Product Manager for the Oracle Utilities Application Framework. I have been working for over 20+ years in the IT Business and am the author of many a technical whitepaper, manual and training material. I am one of the product managers working on strategy and designs for the next generation of the technology used for the Utilities and Tax markets. This blog is provided to announce new features, document tips and techniques and also outline features of the Oracle Utilities Application Framework based products. These products include Oracle Utilities Customer Care and Billing, Oracle Utilities Meter Data Management, Oracle Utilities Mobile Workforce Management and Oracle Enterprise Taxation and Policy Management. I am the product manager for the Management Pack for these products.


« April 2014