1 Reply Latest reply on Apr 23, 2003 2:38 PM by marcwea

    Is an MBean what I want?

    toddrun

      I want to create a class that reads from an XML file, like a *-service.xml file, and exposes attributes read from the file to other classes.

      For example, I'll have:
      <attribute name="SRPPriority">7</attribute>

      Later I want to read the value of the SRPAdmin attribute from another class. I also want to be able to change the attribute (perhaps through the jmx-console) and have the change reflected.

      I assume I want an MBean to do this? I'm looking for confirmation before I spend a lot of time building something that isn't going to do the job. Am I on the right track or is there an easier way?

      Also, if this is the route to take, will I be able to replace the *-service.xml file during runtime and have the MBean read in the new file? This is not a requirement but would be useful.

      Thanks in advance.

        • 1. Re: Is an MBean what I want?
          marcwea

          Seems right to me, use the user-service.xml file for examples and tries. You don't have to create an xml parser, jboss JMX will take care of parsing the user-sevice.xml file or any other -sevice.xml file.

          Marc