2 Replies Latest reply on Jun 17, 2005 4:17 PM by Dimitris Andreadis

    attributes failing for Model MBean in JBoss 3.2.7

    Mike Stran Newbie

      I have an application I'm deploying, on startup I want to register a few JMX Model MBeans to monitor key parts of the application. I'm trying to implement a first model mbean with mixed results, the operations work (so I know that my call to set the managed resource is working). Everything registers with the server without complaint and I can see my bean in the management console but none of the attributes work -they're always set to null.
      I've tried about every permutation I can think of. I have a very simple set of counters that I'm trying to see and no matter what nothing comes up. I'm using Win XP, java 1.4.2_03, JBoss 3.2.7 and commons-modeler 1.1 to create the xml driven Model mbean.

      Example attribute from my mbean that fails -from the xml file (brackets removed for the posting here -it is well formed and follows the DTD):
      attribute name="numPersistentWorflowsInProcess" description="The number of persistent workflows that are in process" type="int"

      I've tried specifying the getter, not specifying it, using primitives, using classes, as well as setting significantly more details in the attribute... nothing seems to make any difference and nothing gets logged it just shows the word null in the admin console. I've added code to try it from a unit test and that returns null as well. I don't think there's a security issue after all the commands work in it, the attributes just don't.

      Does anyone know what's up here?

      Is there a simple example out there using model mbean... I've worked on this for days and I'm stuck, the promise of JMX is fading for my project quickly.