4 Replies Latest reply on Apr 16, 2003 5:27 PM by Eric Jain

    JMX over HTTP?

    Eric Jain Newbie

      Is there any provision for remotely invoking MBean operations over HTTP, rather than RMI?

        • 1. Re: JMX over HTTP?
          Adrian Brock Master

          Yes in 3.2
          It hasn't been backported correctly to 3.0
          so it doesn't work.

          Use the following steps:
          add the following mbean config

          <!-- Where to bind the proxy -->

          <!-- The interface to expose at the proxy -->

          <!-- The JMX Object Name of the invoker that performs the transport -->
          <depends optional-attribute-name="InvokerName">jboss:service=invoker,type=http

          This binds an http adaptor at jmx/invoker/HttpAdaptor

          Use the following jndi.properties

          And the following code

          InitialContext ctx = new InitialContext();
          MBeanServer server = (MBeanServer) ctx.lookup("jmx/invoker/HttpAdaptor");

          Warning, there is no security for this
          adaptor. If you want security, you can
          bind the ejb adaptor to http

          I'm off to fix 3.0

          • 2. Re: JMX over HTTP?

            You can go through the http adaptor by creating the appropriate HTTP requests. A more sophisticated solution in the form of a SOAP connector will be included in 4.0.

            For an example, see the Shutdown.java implementation in JBoss 3.0.7

            • 3. Re: JMX over HTTP?
              Eric Jain Newbie

              Thanks a lot, this works perfectly, even with SSL (I'm already using 3.2.) It's a pitty there is no way to set a username and password for http connections, or is there? Security does work properly when using the jmx-console (user principal propagated to invoked EJBs). Using the ejb-adapter would certainly be a solution, except that it's probably more difficult to integrate such a solution with certain third party tools.

              • 4. Re: JMX over HTTP?
                Eric Jain Newbie

                A SOAP adapter will definitely be very useful, as most of our deployment procedure is controlled by a bunch of Perl scripts...

                Meanwhile, is there any way to get at individual MBean attributes without having to parse a lot of HTML?