commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Luehe <Jan.Lu...@Sun.COM>
Subject Re: commons-modeler and case sensitivity of property names
Date Wed, 29 Jun 2005 00:40:37 GMT
Simon,

Simon Kitching wrote:
> On Tue, 2005-06-28 at 17:21 -0700, Jan Luehe wrote:
> 
>>Is there a way to have commons-modeler honor the case sensitivity of
>>Model MBean attribute (property) names?
>>
>>According to the JMX spec:
>>
>>  All attribute and operation names derived from these design patterns
>>  are case-sensitive. For example, this means that the methods "getstate"
>>  and "setState" define two attributes, one called "state" that is
>>  read-only, and one called "State" that is write-only.
>>
>>  While case sensitivity applies directly to component names of
>>  standard MBeans, it is also applicable to all component names of
>>  all types of MBeans, standard or dynamic.
>>
>>In my class that is instrumented as a Model MBean, I have getAbc() and
>>setAbc() methods, but when I declare "Abc" (instead of "abc") as the
>>attribute name in the associated mbeans-descriptor.xml, I get a
>>javax.management.AttributeNotFoundException
>>("Cannot find attribute abc").
> 
> 
> Can you provide details of where your spec quote can be found?

JMX 1.2 (http://www.jcp.org/en/jsr/detail?id=003), p.40 ("Case
Sensitivity").

> This seems to be in direct contradiction to the JavaBeans specification, and
> I would be rather surprised to see the two specs in such contradiction.

Yes, I've been surprised myself.

> Commons-modeller behaviour would seem to be complying fine with the
> JavaBeans spec.

Correct.

Jan


> 
> Regards,
> 
> Simon
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message