JavaOne 2006 Conference is coming up soon! Our BOF "Using JConsole to Monitor and Manage Your Application" is on May 18, 2006 at 10:30pm. The 9:30pm BOF (same room) is the JDK Tools BOF. The Java SE serviceability team will be there. It's late at night but hope to see you there. We're going to do a live demo of the Mustang JConsole at the JConsole BOF. Below gives you a summary of the Mustang JConsole features. Let us know what you think.
JConsole Plugin SupportA new com.sun.tools.jconsole.JConsolePlugin API is added in Mustang. You can build your custom plugin to run with JConsole, for example, to add a new tab to access your application MBeans. JTopis a JDK demo that shows the thread CPU usage of all threads running in the application. This demo is helpful to identify the threads that has high CPU consumption. It is updated to be used as a standalone GUI as well as a JConsole plugin. To run JConsole with the JTop plugin:
To build a JConsole plugin, it's very simple: 1. Create a subclass of JConsolePlugin class and implement the getTab method and also the newSwingWorker method. The getTab method returns the list of tabs to be added to JConsole or an empty list. The newSwingWorker method returns the SwingWorker to be responsible for the plugin's GUI update. 2. Create a file "META-INF/services/com.sun.tools.jconsole.JConsolePlugin" to contain the fully-qualified class name of the plugin class. JConsole uses the service-provider loading facility to look up and load the plugins. You can have multiple plugins - one entry per plugin. Sundaradded a new scripting demo to demonstrate the power of using scripting language with JMX technology and the out-of-the-box manageability. This scripting demo is built as a JConsole plugin. It adds a scripting shell tab in JConsole where you can access MBean attributes or operations using a scripting language. To try, run JConsole as follows:<JDK6>/bin/jconsole -pluginpath <JDK6>/demo/management/JTop/JTop.jar
> memory=mbean("java.lang:type=Memory") # to get the MemoryMXBean > memory.Verbose # get the value of "Verbose" attribute > memory.Verbose=true # set the "Verbose" attribute to true > memory.gc() # invoke the gc() operation