3 Replies Latest reply on Jun 20, 2002 7:49 PM by sgturner

    MBean communication

    jmilora

      I've recently purchased the JBoss group's JMX book and I
      have a question (newbie) concerning the communication between MBeans.

      If I drop an MBean into the server that exposes a subest of a resource's operations and attributes, how do I call on
      the non-exposed portion of the resource?
      I would think the application would make calls that look
      like ordinary method calls, and not be restricted to
      the attributes and operations exposed by the MBean.
      For example, how would the following scenario be executed?

      I have an MBean that allows the property setup of a
      DataSource. How does the application retrieve the actual
      DataSource without the call being exposed by the MBean?

      Thanks,
      JMilora

        • 1. Re: MBean communication
          schaefera

          Read the book again. JMX only allows you to call methods on methods specified in the management interface. So you have to expose it or you have to get hold of an object reference but then you are outside JMX.

          In JBoss we "missuse" JMX for an communication bus instead of the outside management. So you have the choice.

          Have fun - Andy

          • 2. Re: MBean communication
            jmilora

            I guess I should have been clearer.
            I just didn't see how JBoss was achieving the communication within the JMX specification. The jboss
            example (memory monitor) ran in isolation. It wasn't clear how you can utilize other jboss resources.

            Again, I'm just a little confused as to how JBoss
            makes available resources while claiming JMX as the
            backbone for communication. Does this blur the separation
            of management and non-management functionality?
            Thanks again,
            JMilora


            • 3. Re: MBean communication
              sgturner

              <Does this blur the separation of management and non-management functionality>

              Yes !!. In JBoss, most everything is done thru JMX. That is to say, it works like this:

              Get a reference to MBean server. Then call the MBean server invoke method with the name of the object you want to call, the name of the method on that object, and the parameters to pass.