Bug 151266 - [monitoring] Browsing our server in jconsole is really unfriendly
Summary: [monitoring] Browsing our server in jconsole is really unfriendly
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Incubator (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M6   Edit
Assignee: equinox.incubator-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2006-07-20 12:05 EDT by Pascal Rapicault CLA
Modified: 2007-02-28 09:39 EST (History)
0 users

See Also:


Attachments
A hierarchical view of Equinox Contributions in jconsole (15.06 KB, image/png)
2006-12-01 10:33 EST, Jeff Mesnil CLA
no flags Details
A patch to enrich Contribution's ObjectNames (10.59 KB, patch)
2006-12-13 13:34 EST, Jeff Mesnil CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2006-07-20 12:05:06 EDT
When I browse our jmx server using jconsole, all the objects are displayed in a flat list which is really not friendly. I would imagine that if jconsole has this problem, other consoles would have the same.

I think it would be great to be able to preserve the relationships in the client whatever it is.
Comment 1 Jeff Mesnil CLA 2006-12-01 10:33:28 EST
Created attachment 54892 [details]
A hierarchical view of Equinox Contributions in jconsole

A way to preserve relationships in jconsole is to play with the ObjectNames used to register the MBeans as specified in JMX best practices[1].
jconsole is "smart" enough to create a tree hierarchy based on the ObjectNames' properties[1]

As a prototype, I tried to enrich the ObjectNames used to registered the various ContributionProxyMBean children.
E.g. for a BundleContibution, I registered it under the ObjectName "jmxserver:Type=Bundle,name=" + bundle.getSymbolicName();  

I attached a screenshot to show you the display on jconsole

[1] http://java.sun.com/javase/technologies/core/mntr-mgmt/javamanagement/best-practices.jsp#mozTocId366979
[2] http://blogs.sun.com/lmalventosa/entry/jconsole_mbeans_tab_mbean_tree
Comment 2 Jeff McAffer CLA 2006-12-01 20:32:41 EST
Cool.   can you attach a patch for this?  By all means, point out any other best practice failures that we have in here.
Comment 3 Jeff Mesnil CLA 2006-12-13 13:34:23 EST
Created attachment 55600 [details]
A patch to enrich Contribution's ObjectNames

this patch is a proof of concept (not thoroughly tested) which shows how we can enrich the Contribution's ObjectName to create a hierarchy based on ObjectNames properties.

It simply flagged Contribution.getObjectName() method as protected (instead of private) so that subclasses could chose their ObjectName.
E.g the ExtensionContribution.getObjectName() will return:
  jmxserver:type=Extension,ExtensionPoint=<extension-point ID>,name=<extension ID>
Comment 4 DJ Houghton CLA 2007-02-28 09:39:19 EST
Great, thanks! I have released the patch as is for now. We need to re-visit the use of ObjectNames soon...