Description
- javax.management.MBeanFeatureInfo's JBoss implementation (superclass of
javax.management.MBeanParameterInfo y javax.management.MBeanAttributeInfo),
validates in his constructor that "name" (first constructor's parameter) must
be a valid java identifier (ex: "blah" is valid but "blah blah" is not).
- PerformanceMonitor expose dynamic MBeans, and it has in its attribute's
names the method signature that it is collecting info ( ex someMethod( some
parameter ) ); then, when the interceptor tries to register the dynamic MBean
gets a runtime exception:
java.lang.IllegalArgumentException: name is not a valid java type (or is a
reserved word): blah blah
at javax.management.MBeanFeatureInfo.<init>(MBeanFeatureInfo.java:68)
at javax.management.MBeanAttributeInfo.<init>(MBeanAttributeInfo.java:99)
at gov.afip.pampa.component.AttributeInfoTest.main(AttributeInfoTest.java:20)
- Also, LogManagement uses for dynamic MBeans
org.apache.log4j.jmx.LoggerDynamicMBean, and this class creates
javax.management.MBeanParameterInfo with invalid (for JBoss) names:
// the <SPACE> in "class name" is wrong
params[0] = new MBeanParameterInfo("class name", "java.lang.String",
"add an appender to this logger");
// idem
params[1] = new MBeanParameterInfo("appender name", "java.lang.String",
"name of the appender");