Java
Java SE
Technologies
| »
Overview
| »
Basic
| »
CORBA
| »
HotSpot VM
| »
JNDI
| »
Mntr-Mgmt
| »
Tools APIs
| »
XML
|
| By Éamonn McManus,JSR 3 Maintenance Lead, July 2003 |
| |
|
This document lists the errors and inconsistencies that have been found in the 1.2 Maintenance Release of the Java Management eXtensions (JMX) specification. The Reference Implementation of the specification is being updated to reflect these corrections. Independent implementors are encouraged to do so too. The most important corrections are the first two. The others are minor. The bug numbers given in parentheses are for internal use by the maintainers of the Reference Implementation. The changes are as follows. Each change is detailed below.
Class loader repository may contain additional class loaders (4839389)The JMX 1.2 spec says that in certain cases the class loader used to find classes is the MBean server's own class loader. This worked well when the JMX API was a stand-alone package, because the MBean server's class loader was usually the system class loader (the one that loads classes from the classpath). Provided the application code was also loaded from the system class loader, classes were found as expected. The problem is that when it is integrated into J2SE, the MBean server's class loader will be the bootstrap class loader. This class loader will not find application classes. A change is needed so that application code that works with JMX today will continue to work when the JMX API is integrated into J2SE. As a specific example, here is the simplest way to create an MBean:
MBeanServer mbs;
mbs.createMBean(className, objectName);
Probably most applications that create MBeans do it this way. The class named by className is loaded using the "class loader repository", which by default contains just the MBean server's class loader. This no longer works if this class is an application class but the MBean server is part of J2SE. The correction is in the section Order of Loaders in the Class Loader Repository on p143. To the paragraph beginning "The first loader in the class loader repository", add the following sentences: An implementation may include other class loaders in the class loader repository. It is recommended that implementations include the system class loader in this repository. The system class loader is the one returned by
Illegal identifiers no longer produce exceptions (4839259)Version 1.1 of the spec said that identifiers in MBeans (class name strings, attribute, operation, and paramter names) should be valid Java identifiers, but did not enforce this. In version 1.2, the constructors of the various MBean*Info classes were modified so that they do enforce this requirement. This change broke existing code, as people in fact used non-Java-identifiers here. The correction is that in the constructors for the classes
Clarify notification source rewriting (4827539)In version 1.2 of the spec, it is a little unclear how notification sources are rewritten when a notification is forwarded through the MBean server. The documentation for MBeanServer.addNotificationListener is clear, but the documentation for the Notification class is not. The correction is to replace the sentence in the Javadoc for the
It contains a reference to the source MBean: if the notification has been forwarded through the MBean server, and the original source of the notification was a reference to the emitting MBean object, then the MBean server replaces it by the MBean's ObjectName. Limit problems due to
|
Related ResourcesRelated DownloadsPopular Topics
Sun ResourcesRelated SitesGetting Started? |
| | |
Oracle is reviewing the Sun product roadmap and will provide guidance to customers in accordance with Oracle's standard product communication policies. Any resulting features and timing of release of such features as determined by Oracle's review of roadmaps, are at the sole discretion of Oracle. All product roadmap information, whether communicated by Sun Microsystems or by Oracle, does not represent a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. It is intended for information purposes only, and may not be incorporated into any contract.
| ||||||||||||