Wednesday Jul 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: getting access to the JMX connection for the given application

  • 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...
        }
    }
    

  • JvmMXBeans: getting access to the JVM instrumentation for the given application

  • 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...
        }
    }
    

  • CachedMBeanServerConnection: JmxModel and JvmMXBeans attributes caching
  • 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.

Tuesday Jul 08, 2008

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!

Monday Apr 14, 2008

VisualVM Beta 2 released

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!

Monday Mar 10, 2008

VisualVM Beta 1 released

VisualVM Beta 1 has been released.

What's new on JMX side?

  • Support for explicit JMX connections (Applications > Add JMX connection...).
    • explicit JMX connections are persisted between VisualVM sessions
    • separate connection and security dialogs (opened only when required)
    • security credentials persisted between sessions (no need to reauthenticate)
  • Options panel settings:
    • MBeans tab plotter polling period
    • JConsole plugin path
    • JConsole tabs refresh period
  • MBeans tab: notification number displayed in Notifications subtab label (a la JConsole 5)

What's new on Profiler side?

  • Java core classes excluded by default.

New cool stuff!

  • Application snapshots
  • GlassFish plugin available for download on VisualVM Plugin Center

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!

Tuesday Feb 19, 2008

VisualVM Milestone 3 released

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?

  • The sources are available in CVS. Check the website for the API's javadoc and build instructions.
  • Keep in mind that the VisualVM experimental API is still work-in-progress and incompatible changes could be still introduced.
  • VisualVM plugins for MBeans tab and custom JConsole plugins are available in the VisualVM Plugin Center. Have a look at the Introduction to VisualVM document for more detailed info on how to install and configure these plugins.
  • Note for VisualVM plugin developers: The docs bundle contains a PDF file that explains the main UI API entry points.

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!

Wednesday Jan 23, 2008

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]

Tuesday Jan 15, 2008

VisualVM Milestone 1 released

The VisualVM Milestone 1 has just been released.

Major changes in this release:

  • improved UI,
  • better support for Sun and BEA virtual machines,
  • simple localhost viewer (right-click on the Local node and select the Open action),
  • recognition of some applications (Ant, Tomcat, GlassFish/SJSAS, JBoss, NetBeans),
  • removed redundant telemetry information.

If you want to play with the new bits just download it from the project's java.net website and send us feedback.

Saturday Nov 24, 2007

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]

Monday Nov 19, 2007

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]

Thursday Oct 18, 2007

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!

About

lmalvent

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today