Wednesday July 09, 2008 VisualVM's JMX API entrypoints available in VisualVM-Tools module
It's more than likely that VisualVM plugin developers will be interested in accessing their JMX instrumented applications from within VisualVM. The VisualVM-Tools module adds some public APIs for JMX-related things in the com.sun.tools.visualvm.tools.jmx package required to get access to the underlying JMX connection and also to retrieve the JVM MXBeans that will grant access to the underlying JVM instrumentation. Then writing a JMX-based plugin for VisualVM is as simple as defining your custom UI and fill it in with the information coming from the JMX model.
Find below some examples of use:
JmxModel jmx = JmxModelFactory.getJmxModelFor(application);
if (jmx == null || jmx.getConnectionState() != JmxModel.ConnectionState.CONNECTED) {
// JMX connection not available...
} else {
MBeanServerConnection mbsc = jmx.getMBeanServerConnection();
if (mbsc != null) {
// Invoke JMX operations...
}
}
JmxModel jmxModel = JmxModelFactory.getJmxModelFor(application);
if (jmxModel != null && jmxModel.getConnectionState() == ConnectionState.CONNECTED) {
JvmMXBeans mxbeans = JvmMXBeansFactory.getJvmMXBeans(jmxModel);
if (mxbeans != null) {
MemoryMXBean memoryMXBean = mxbeans.getMemoryMXBean();
// Get/Set attributes or Invoke operations on MemoryMXBean...
}
}
In order to reduce the number of network roundtrips between the JMX clients running in the VisualVM tool and the JMX servers running in the target VMs, save some bandwidth and improve overall performance you can cache both the JMX model and the JVM instrumentation MBeans attributes values for a given interval and register MBean cache listeners that will be notified when the MBean cache has been flushed such that the presentation layers can be updated with the new values by simply calling the getter methods in the MBeans. Have a look at CachedMBeanServerConnectionFactory and JvmMXBeansFactory to have more detailed info on these APIs.
Posted by lmalvent ( Jul 09 2008, 11:58:05 PM CEST ) Permalink Comments [0]JDK 6 Update 7 Java VisualVM and VisualVM 1.0 released
After eight months of frantic development since VisualVM Preview 1 was released I'm happy to announce the general availability of JDK 6 Update 7 Java VisualVM and VisualVM 1.0 (java.net).
What's new?
Well, mainly that if you download and install JDK 6 Update 7 on your machine running VisualVM will be as simple as calling <jdk-home>/bin/jvisualvm.
VisualVM comes with a set of plugins available for download from the VisualVM Plugin Center. In order to enhance VisualVM's core functionality go to "Tools | Plugins" and give a try to any of the available plugins or even better extend the tool by writing your own plugins using the VisualVM APIs for plugin developers.
Visit http://java.sun.com/javase/downloads/index.jsp or https://visualvm.dev.java.net for download or to get more information.
Use feedback at visualvm.dev.java.net mailing list to send us your feedback.
Have fun!
Posted by lmalvent ( Jul 08 2008, 10:54:33 PM CEST ) Permalink Comments [2]VisualVM Beta 2 has been released.
What's new?
Mainly API stabilization, lots of minor improvements and bug fixes.
Visit https://visualvm.dev.java.net for download or to get more information.
Use feedback at visualvm.dev.java.net mailing list to send us your feedback.
Have fun!
Posted by lmalvent ( Apr 14 2008, 04:49:01 PM CEST ) Permalink Comments [0]VisualVM Beta 1 has been released.
What's new on JMX side?
What's new on Profiler side?
New cool stuff!
Visit https://visualvm.dev.java.net for download or to get more information.
Use feedback at visualvm.dev.java.net mailing list to send us your feedback.
Have fun!
Posted by lmalvent ( Mar 11 2008, 03:05:37 AM CET ) Permalink Comments [1]VisualVM Milestone 3 has just been released with some more fixes and UI improvements.
You can download it from the VisualVM project website as usual.
What's new?
Visit https://visualvm.dev.java.net for download or to get more information.
Use feedback at visualvm.dev.java.net mailing list to send us your feedback.
Have fun!
Posted by lmalvent ( Feb 19 2008, 03:43:31 PM CET ) Permalink Comments [0]JConsole plugin for VisualVM Milestone 1
This is an experimental plugin for VisualVM Milestone 1 that allows to add the custom JConsole plugins for both local and remote Java applications into the VisualVM tool.
[Read More] Posted by lmalvent ( Jan 24 2008, 12:27:20 AM CET ) Permalink Comments [6]The VisualVM Milestone 1 has just been released.
Major changes in this release:
If you want to play with the new bits just download it from the project's java.net website and send us feedback.
Posted by lmalvent ( Jan 15 2008, 02:56:57 PM CET ) Permalink Comments [2]JConsole plugin for VisualVM Preview 2
This is an experimental plugin for VisualVM Preview 2 that allows to add the JConsole tool functionality into the VisualVM tool. This new VisualVM plugin provides support for JConsole core tabs as well as custom JConsole plugins for both local and remote Java applications.
[Read More] Posted by lmalvent ( Nov 25 2007, 01:51:00 AM CET ) Permalink Comments [3]MBean Browser plugin in VisualVM Preview 2 The VisualVM Preview 2 Plugins Center provides an MBean Browser plugin that adds the JConsole's MBeans tab functionality to the VisualVM tool. [Read More] Posted by lmalvent ( Nov 19 2007, 10:46:59 PM CET ) Permalink Comments [2]
VisualVM: The new all-in-one troubleshooting tool for the Java platform
At JavaOne this year we showed a first prototype of a new all-in-one troubleshooting tool for the Java platform named VisualVM.
We promised that we would make it public as soon as we could and the time has come.
Go to the VisualVM project on java.net, download the new tool, give it a try and send us feedback.
Have fun!
Posted by lmalvent ( Oct 18 2007, 10:36:07 AM CEST ) Permalink Comments [4]JConsole local process list on Windows systems
Several times in the JMX and M&M SDN forums I have seen developers post questions like What should I see in the connection dialog's local process list in JConsole when running on Windows platforms?. There are several answers to this question depending on how both JConsole and the target Java application have been deployed, and more precisely, how the TMP and/or TEMP environment variables have been set in the command shell before launching them.
[Read More] Posted by lmalvent ( Jul 09 2007, 09:07:33 PM CEST ) Permalink Comments [6]TheServerSide Java Symposium Europe
Eager to learn more about the monitoring and management features of the Java SE 6 Platform?
If yes, I'm going to give a talk about the JMX, JConsole and M&M technologies and the different serviceability tools available in the Java SE 6 Platform at TheServerSide Java Symposium Europe in Barcelone on June 28, 2007.
For more detailed info about my talk have a look at the TSSJS Europe website.
I look forward to seeing you all there!
Posted by lmalvent ( Jun 26 2007, 06:26:58 PM CEST ) Permalink Comments [0]JavaOne 2007 Hands-On Lab 1420
Don´t be sad if you couldn´t come to JavaOne this year and attend your favorite JConsole troubleshooting hands-on lab.
The lab illustrates how JConsole can be used for troubleshooting problems in running Java applications as well as how a Java application can be monitored using JMX and AOP in a non-intrusive manner. A simple database application based on the Spring Framework, monitored by an open source JMX AOP monitoring tool called Glassbox, is used as an example. The lab provides also a custom JConsole plugin that plots some custom servlet request metrics computed from the values returned by the Glassbox MBeans.
You can now download it from the SDN website, LAB-1420.
Have fun and feel free to send us feedback for enhancements.
Posted by lmalvent ( Jun 23 2007, 03:16:34 AM CEST ) Permalink Comments [2]Peter Doornbosch has written an enhanced JTop plugin for JConsole.
If you want to know more about the new features it incorporates and play with it go to:
http://blog.luminis.nl/luminis/entry/top_threads_plugin_for_jconsole
Posted by lmalvent ( Jun 21 2007, 05:36:36 PM CEST ) Permalink Comments [0]Per-thread CPU Usage JConsole Plugin
JConsole plugin that allows to plot the CPU usage of a set of threads running in a remote VM. It could be seen as an add-on to the existing JTop JConsole plugin in Java SE 6 (<JDK6_HOME>/demo/management/JTop). The aim of this plugin is to show how easy it is to add a custom UI to JConsole based on the Java SE platform instrumentation MXBeans in conjunction with the JFreeChart chart library.