[ 
http://issues.apache.org/jira/browse/HIVEMIND-143?page=comments#action_12317445 
] 

Achim Hügen commented on HIVEMIND-143:
--------------------------------------

JBoss seems to be the only library that does such restrictive tests,
which are not described in the spec but only in javadoc of jmx.
I looked in the current codebase from JBoss 4 and surprisingly all
those checks are removed again!?

A solution is to substitute invalid characters (testable via 
Character#isJavaIdentifierPart)
by underscores: 

void create(Object o)  -> void_create_Object

Maybe one should test which chars the running jmx implementation accepts
and then decide which naming pattern to use.




> JMX PerformanceMonitor and LogManagement don't work with JBOSS
> --------------------------------------------------------------
>
>          Key: HIVEMIND-143
>          URL: http://issues.apache.org/jira/browse/HIVEMIND-143
>      Project: HiveMind
>         Type: Bug
>   Components: jmx
>     Versions: 1.0
>     Reporter: Achim Hügen
>     Assignee: Achim Hügen

>
> - 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");

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to