Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.0-rc2
-
Fix Version/s: None
-
Component/s: Engine
-
Labels:None
-
Number of attachments :
Description
The metaclass MBeanInfoBuilder does not process the superinterfaces of a management interface. This behaviour is not consistent with the jmx spec.
Following patch corrects this:
— MBeanInfoBuilder.java Wed Oct 6 19:06:52 2004
+++ MBeanInfoBuilder.java.patch Wed Oct 6 19:34:52 2004
@@ -161,6 +161,45 @@
helper.setClassname( type.getName() );
helper.setDescription( description );
+ introspectAndExtract( type, helper );
+
+ if( type.isInterface() )
+
+ return helper.toModelMBeanInfo();
+ }
+
+ /**
+ * Introspects superinterfaces.
+ * This method uses recursion to iterate through all higher superinterfaces.
+ * (Warning: possible stack overflow)
+ *
+ * @param type the class
+ * @param helper the helper
+ * @throws Exception if unable to introspect class
+ */
+ private void introspectSuperinterfaces( final Class type, final ModelInfoCreationHelper helper )
+ throws Exception
+ {
+ Class[] apis = cls.getInterfaces();
+ for( int i = 0; i < apis.length; i++ )
+ }
+
+ /**
+ * Introspects a class and extracts MBean constructors/properties/operations.
+ *
+ * @param type the class
+ * @param helper the helper
+ * @throws Exception if unable to introspect class
+ */
+ private void introspectAndExtract( final Class type, final ModelInfoCreationHelper helper )
+ throws Exception
+
/**
Activity
| Field | Original Value | New Value |
|---|---|---|
| Comment | [ 28440 ] |
| Comment | [ 28471 ] |