Hi. This conversation is best suited for the newsgroup, so I have started a thread there. The following is the same reply as posted in the newsgroup:
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) [EMAIL PROTECTED] _______________________________________________ equinox-dev mailing list equinox-dev@eclipse.org https://dev.eclipse.org/mailman/listinfo/equinox-dev