This is stupid, for the code
as a javabean the property name as "state"
as a stantard mbean the attribute name is "State"
through mejb the attribute name is "state"
and each spec is "layered" on the previous one.
The problem occurs because JSR77 is implemented using
This is a bug as it stands.
A simple hack would be to convert the name in mejb,
but that doesn't really solve the problem when there
are attributes "state" and "State".
A better fix might be to use pojos and required modelmbeans, possibly with its own resource type
similar to the standard resource.
Andreas/Juha what do you think?
I didn't play with the Sun RI (because they are normally buggy but I check it out).
ATTENTION: the spec talks about attributes like Java attributes but it was my opinion that because MEJB is based on JMX that it would go along with JMX. Either it is a bug in JMX that attributes has to be upper case but then I would say that we still keep it upper case because I ask for an attribute through MEJB which is JMX based or JMX has to be changed or its implementation.
It is important that the spec. is a model and not an implementation so the name of the attributes depends on MEJB.
Have fun - Andy
A Model MBean resource type implementation that is not case sensitive... ? Yeah...
Is that what you mean?
Attribute interceptor that just ignores case...? Or maybe just the case on the first letter? Configured when that specific resource type is used with MMB.
Or we could just do even 77 specific resource types if we want..
Yes, that is what I meant.
Actually, a simpler (but ugly) hack might be to use
getobjectName in the Standard MBeans :-)
For JSR-77 I can change the lower-case attribute name to the upper-case Attribute Name in Standard MBeans as I do for "start()" => "ejbStart()" method conversion.
So this would fix this problem. Can someone remind me in a week or two if I forget about this - Thanx
Have fun - Andy
What I have understand from JSR77, is that it has been designed to be interoperable between vendor, which means that a JSR77 client from XYZ can talk to a JSR77 server from ABC.
The JSR77 spec. are more than a model, if I take a look at the code samples : the attributes have the first letter lowercase !!!
Check the spec. again and you will see that they do not speak about Java classes (even the use UML). If you don't believe me then check out the attribute with type "OBJECT_NAME". The reason why this is so is because it also supports SNMP and CIM protocol where you have no Java classes at all.
On the other hand attributes should start with a lowercase character but the JMX spec. for Standard MBeans screwed it up. I will soon release a fix allowing you to use both "Uppercase and lowercase attributes".
Thanx for pointing this out - Andy