3 Replies Latest reply on Jan 31, 2002 2:44 PM by tom.elrod

    discovery of a jmx bean on a remote machine.

    fjunior1

      i am relatively new to jmx, i would like to know if i can "discover" a remote bean from the server or if the bean has to present itself to the server.

      if i can get the bean information from the server without the remote bean presenting itself, how is it done under the covers?

        • 1. Re: discovery of a jmx bean on a remote machine.
          sjus00

          I'm not sure that I really understood your problem.

          If you want to lookup, whether an MBean is registered in a MBeanserver, you can try this:

          javax.management.MBeanServer:
          isRegistered(ObjectName name)
          Checks whether an MBean, identified by its object name, is already registered with the MBean server.


          To reach the remote server, you could go through JMX RMI (see related topics a few days ago).

          Hope it helps!

          • 2. Re: discovery of a jmx bean on a remote machine.
            fjunior1

            well let me refrase the question again...

            let's say that i have jboss running in a machine and i have a bean in another machine. i would like the server to lookup in a range of machines which one has a bean and when it finds a machine with a bean then add it to the MBeanServer.

            if that is not possible, then should the remote bean register itself in the server when it runs...?

            this is like a remote discovery of beans. the bean actually is not on the server but on the remote client. but the point is how to make the server aware of that bean....

            • 3. Re: discovery of a jmx bean on a remote machine.

              I don't think it is really feasible to have a MBean on a remote server and expect a MBeanServer on another machine be able to find it directly. Instead, a more likely senerio (or a better one) is that you'll have the remote MBean registered with a local MBeanServer. MBeanServers will be able to recognize other MBeanServes on the network and share their information about their local MBeans.
              This is the general approach used in the JDMK. However, there are no current specification covering how this is to be done, so there is no standard. I think that this type of feature will be added to JBoss-MX in the future (maybe near future).