This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 69773

Summary: JMX-based SFS/lookup/etc. browser
Product: apisupport Reporter: Jesse Glick <jglick>
Component: InspectorAssignee: Martin Kozeny <mkozeny>
Status: NEW ---    
Severity: blocker CC: jtulach, kitfox, sreimers
Priority: P2    
Version: 5.x   
Hardware: All   
OS: All   
URL: http://blogs.sun.com/roller/page/jglick?entry=mustang_agents_can_be_used
Issue Type: ENHANCEMENT Exception Reporter:

Description Jesse Glick 2005-12-02 19:50:42 UTC
It should be possible to create a module apisupport/agent (to be included in
harness cluster, perhaps? or platform?) which would register some JMX MBeans
that would serve up important runtime diagnostic info such as

- contents of SFS (incl. available instances, DataObject info, etc.)

- global lookup

- AWT focus information (see issue #31449)

- preferences

- module list

- maybe more...

Quite simple to do in JDK 6, using MXBeans. Trickier but still possible in JDK
5: could use Model MBeans (but I can't get them to work at all); or Dynamic
MBeans (cumbersome); or Open MBeans (reasonably powerful but a pain to set up).
Also in JDK 5 you apparently need to pass -Dcom.sun.management.jmxremote to the
VM in order for management to work at all.

Ideally, information would be browsable in a crude form using just jconsole, if
you really needed to (e.g. for emergency field diagnosis), but with a richer
client available as part of a separate apisupport IDE module, e.g. displayed in
the Runtime tab.

Could serve as a complete replacement for the "bean browser" functionality in
apisupport, but usable even in platform apps.
Comment 1 sreimers 2006-02-18 19:39:04 UTC
Maybe you already know this - but here is a nice tool http://mc4j.sf.net - it is
based on NetBeans and contains generic access to JMX - try it out it may be a
starting point at least
Comment 2 Jesse Glick 2006-02-18 20:23:26 UTC
Re. MC4J - interesting. Not directly usable but I will look to see if there are
some tricks I can use from it. Thanks for tip (I had heard about it long ago but
forgotten).
Comment 3 sreimers 2006-02-18 20:57:09 UTC
Sound like an interesting project. Since I am developing a rich client
application based on NetBeans RCP I am interested in anything you dig up. Maybe
I can even help out with something?
Comment 4 Jesse Glick 2006-03-03 17:51:12 UTC
Re. last comment: perhaps. It's up to me to get things rolling and create the
basic framework and some inspection hooks. Don't have time to work on it
immediately but I hope sometime this year. Then it should be relatively easy for
people to add additional mbeans (or whatever) according to their needs and
corresponding GUI visualizers from the IDE.