Re: jmx question
Eamonn McManus <[email protected]>
| Newsgroups | gmane.comp.java.mx4j.user |
|---|---|
| Organization | Sun Microsystems, Inc |
| Message-ID | <[email protected]> |
To add to Simone's answer, when he says... Dynamic MBeans return the management interface that they want, implementing getMBeanInfo(), and they're not bound to implement interfaces. ...this means that the class can decide what MBeanInfo it returns based for example on constructor parameters. Since the MBeanInfo is the management interface, that interface can change depending on constructor parameters, so different instances of the same class can have different management interfaces. And in fact that is exactly what happens with the class javax.management.StandardMBean , where you specify a Java interface in the constructor, and the constructed object uses that interface as its management interface. Éamonn McManus JMX Spec Lead http://weblogs.java.net/blog/emcmanus/ Simone Bordet wrote: Hi, On 9/24/07, salztig <[email protected]> wrote: Hi, just a jmx question. Is is possible that a class implements more than one MBeans? I'm nerly sure that this isn't possible using Standard MBeans, but I'm not so confident whit jmx technology to know if this could be possibile with other MBeans types (Dynamic, Open....) Dynamic MBeans return the management interface that they want, implementing getMBeanInfo(), and they're not bound to implement interfaces. Standard MBeans have to implement one interface that gives them the status of MBean (the className + "MBean" thing), but that interface can extends other interfaces, so that: interface FooMBean { ... } interface BarMBean { ... } interface BazMBean extends FooMBean, BarMBean { ... } Now MBean Baz can be seen as extending MBeans Foo and Bar. Simon ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Mx4j-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mx4j-user