2 Replies Latest reply on Aug 13, 2007 9:39 AM by Morten Hauch

    Exposing MBeans with remoting

    Morten Hauch Newbie

      It is possible to expose any MBean with an invoker using JRMPProxyFactory, and it is possible to access any MBean with RMIAdaptor.invoke(...).
      The way of doing this is nicely decoupled from the target MBean.

      I would like to do the same things using remoting (ie. calling any MBean using invoke(..) and exposing an MBean with a typed interface - in both cases without changes in the implementation on the target MBean) - can anybody hint me on how to obtain this?

        • 1. Re: Exposing MBeans with remoting
          Ron Sigal Master

          You might want to look into JSR 160 (JMX Remoting). From the JSR 160 home page (http://jcp.org/en/jsr/detail?id=160):

          The JMX specification (JSR 3) currently provides the means to create Java based management agents, through standardized techniques for instrumentation, and standardized agent services. But it does not standardize the means to access these agents remotely.

          This JSR will provide one mechanism for remote access by building on the JMX notion ofconnectors. A connector provides a remote client API for a JMX-based agent that is very similar to the local client API. This means that remote clients can call the familiarMBeanServer operations and can register for notifications using the NotificationListener interface.

          This JSR will define what the remote client API looks like and how it behaves. It will also define standard transport protocols that an implementation of the JSR must support, so that different implementations will interoperate.

          There are multiple implementations, including a JBoss implementation in the SVN repository http://anonsvn.jboss.org/repos/jbossas/trunk/jmx-remoting.
          There is a brief discussion about it on the wiki page http://www.jboss.org/wiki/Wiki.jsp?page=Remoting.

          Of course, I suppose you could roll your own by wrapping an org.jboss.remoting.ServerInvocationHandler around an MBeanServer.

          • 2. Re: Exposing MBeans with remoting
            Morten Hauch Newbie

            Thanks for your answer.

            As far as I can see, it answers my question on how to obtain something similar to RMIAdaptor (ie. exposing the MBeanServer interface remotely).

            However I can't see if anything like the JRMPProxyFactory is supported (ie. exposing a typed interface)?