2 Replies Latest reply on Aug 7, 2003 7:53 PM by juhalindfors

    MbeanServer

    tonik

      What is the difference with using createMbean and the instanciate methods in the MbeanServer.

      I can get the invoke method to work on my Managed resource.
      But createMbean gives an instanciation exception.

      Im using ModelMbeans with my implementation. I am under the impression that ModelBeans can be any java class which is defined in the xml is this true or should it extend an interface still?

      help

      cheers,
      ToniK
      www.tonik.net

        • 1. Re: MbeanServer

          createMBean() is instantiate + registerMBean()

          • 2. Re: MbeanServer


            > Im using ModelMbeans with my implementation. I am
            > under the impression that ModelBeans can be any java
            > class which is defined in the xml is this true or
            > should it extend an interface still?

            Sort of. You can set any POJO as the managed resource for a ModelMBean instance. The ModelMBean instance implementation is provided for you by the JMX implementation.

            The interface you expose is declared with the JMX metadata classes. Notice that you need to set the POJO reference and metadata before you register the ModelMBean instance to MBean server.

            -- Juha