Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6254721
Votes 0
Synopsis Define some standard Descriptor fields and set them for appropriate MBeans
Category jmx:classes
Reported Against
Release Fixed mustang(b43)
State 10-Fix Delivered, request for enhancement
Priority: 3-Medium
Related Bugs 6289244 , 6175517 , 5072476 , 6204469
Submit Date 13-APR-2005
Description
The JMX spec in Mustang will allow Descriptors in plain MBeanInfo (and MBeanAttributeInfo etc) as well as ModelMBeanInfo.  It should define some standard Descriptor fields beyond those already defined for Standard MBeans.  Here are some candidates:

* immutableInfo=true|false

When immutableInfo=true, the MBean promises that its metadata (MBeanInfo etc) will never change.  This means that a client can read it once and keep it in cache without ever having to check it.  By default an MBean is allowed to have MBeanInfo that changes over time, though this is usually discouraged.  Remote clients in particular can benefit from this.  For example, "cascading" (see 5072476) can avoid re-calling remote getMBeanInfo() whenever getMBeanInfo() is called on a proxy.  Since getMBeanInfo() is called for every security check when there is a security manager, this is a big win.

The MBeanInfo constructed for a Standard MBean can set immutableInfo=true except when the MBean is a NotificationBroadcaster (since its MBeanNotificationInfo[] could potentially change over time).  Ideally we would have a solution for the NotificationBroadcaster case too, perhaps through an annotation on the Standard MBean interface.

A Standard MBean implemented with the javax.management.StandardMBean class can set immutableInfo=true if it does not override the getCachedMBeanInfo() method, which can be determined through reflection.  A StandardMBean subclass that does override this method can still be immutable because it can insert the immutableInfo field itself.

* mbeanInterface=java.class.name

For an MBeanInfo, this would be a string that is the name of the Standard MBean Java interface that was used to derive it.  Dynamic MBeans could also set this field if there is an appropriate Java interface.  MXBeans would set it to the MXBean interface.

* originalType=java.type

MXBeans (see 6175517) would set this for the types of attributes and of operation parameters and return types to indicate the original Java type that was mapped to an Open Type.  In the case of operation return types, the field has to be put in the Descriptor of the MBeanOperationInfo, since there is no separate Descriptor for the return type.
  xxxxx@xxxxx   2005-04-13 16:47:30 GMT

Another useful field would be "openType", with the corresponding value being a subclass of javax.management.openmbean.OpenType.  This would be set by default in the Descriptor for OpenMBeanAttributeInfo, OpenMBeanParameterInfo, and OpenMBeanOperationInfo (where it represents the return type of the operation).  The purpose of this field would be to allow MBeans that are not Open MBeans (specifically Model MBeans) to reuse the Open MBean concepts. 
  xxxxx@xxxxx   2005-04-22 15:23:23 GMT
  xxxxx@xxxxx   2005-05-09 09:09:10 GMT
Work Around
N/A
Evaluation
After discussion with the Expert Group, interfaceClassName is a better name than mbeanInterface.  Also added openType field following this discussion.
  xxxxx@xxxxx   2005-04-22 15:43:13 GMT
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang