Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Re: [equinox-dev][monitoring] Making MXBean attributes automatically available while using org.eclip
Re: [equinox-dev][monitoring] Making MXBean attributes automatically available while using org.eclip [message #99634] Fri, 12 October 2007 14:12 Go to next message
Robert Connell is currently offline Robert ConnellFriend
Messages: 1
Registered: July 2009
Junior Member
Simple answer: You are right in that currently you would have to augment
getMBeanInfo in your derived Contribution class to return the set of
attributes your contribution will expose.

Only objects that are instances of classes that implement DynamicMBean or
implement object.getClass().getName() + "MBean" may be registered with the
mbean server. The latter

instances have their attributes gleaned immediately from the getter and
setter methods - and appear so in JConsole. There were two reasons to
implement the former, though suggestions

and contributions as to how both can be supported are certainly welcome.
First, some 'Contribution's may not know what attributes they would like to
expose until run-time, one such

set of 'Contribution's that comes to mind are property files that you may
which to manage remotely - via the Eclipse client. The second, in order to
facilitate serialization of the 'Contribution'

over various transport protocols, it is a great deal simpler to request from
the 'Contribution' its accessble attributes and operations so that they may
be wrapped by a simple container class

(see ContributionProxy).

So, in short, I would try just creating the array of attributes that you
which to expose, unless you are interested in tackling some larger design
details. Please feel free to continue the thread

with any comments or questions.

Robert Connell

>I'm trying to expose some MXBeans through the Contribution and
>ContributionProvider classes in the org.eclipse.equinox.jmx.server package.
>The MBeans that get registered have their getter and setter methods mapped
>to operations rather then as attributes of >the >MBean. Is there a way to
>automatically have attributes show up like how the
>javax.management.MBeanServer.registerMBean function does?

>I'm exposing the information as properties through the getProperties()
>function in my Contribution class, but that does not work when viewing the
>bean from jconsole. It looks like I can create my own array of
>MBeanAttributeInfo classes and pass that to >MBeanInfoWrapper, but that
>seems overly complicated to do what java already does automatically.

Andrew SkeneProteus Technologies, LLC

7095 Samuel Morse Drive, Suite 100

Columbia, MD 21046

443-539-3417 (office)
Re: [equinox-dev][monitoring] Making MXBean attributes automatically available w [message #99649 is a reply to message #99634] Mon, 15 October 2007 14:32 Go to previous message
Eclipse UserFriend
Originally posted by: askene.proteus-technologies.com

Thanks for the explanation on the attribute handling. It makes a more
sense to me why it's setup the way it is now. It is easy enough to create
the attribute list within the contribution to have jconsole pick them up,
so that's what I'll probably run with.
Previous Topic:Activator issues
Next Topic:P1 blocker bug with loading of OSGi Extensions
Goto Forum:
  


Current Time: Fri Apr 19 23:35:14 GMT 2024

Powered by FUDForum. Page generated in 0.02918 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top