7 Replies Latest reply on Aug 19, 2002 4:50 PM by Andreas Schaefer

    JBoss and JSR77


      Hi all,

      I've take a look on JSR77 management specification and donwload the J2EE RI provided by Sun.
      Something is puzzling me :
      - In the JSR03, the spec states that MBean attribute are case sensitive ("State" attribute is different from "state" attribute)
      - In the JSR77, each managed object is required to have some attribute (objectName, eventProvider, and so on).
      - In the J2EE RI, the case of the attribute of the managed object is the same that the one found in JSR77 ("objectName" where "objectName" is required).
      - In JBoss 3.0.1, the case is different ("ObjectName" instead of "objectName" as required).

      So, is JBoss JSR77 compliant ?
      Does the case of the attribute needs to be modified ?


        • 1. Re: JBoss and JSR77
          Adrian Brock Master

          This is stupid, for the code

          int state;
          int getState();

          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
          standard mbeans.

          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?


          • 2. Re: JBoss and JSR77
            Andreas Schaefer Apprentice


            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

            • 3. Re: JBoss and JSR77

              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..

              -- Juha

              • 4. Re: JBoss and JSR77
                Adrian Brock Master

                Yes, that is what I meant.

                Actually, a simpler (but ugly) hack might be to use
                getobjectName in the Standard MBeans :-)


                • 5. Re: JBoss and JSR77
                  Andreas Schaefer Apprentice

                  Hi Geeks

                  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

                  • 6. Re: JBoss and JSR77

                    Hi again,

                    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 !!!

                    Very strange...

                    • 7. Re: JBoss and JSR77
                      Andreas Schaefer Apprentice


                      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