1 Reply Latest reply on Feb 17, 2002 7:32 AM by juha

    can't see the jmx forest for the trees

    mdajboss

      (this same message is being sent to both openjmx-users@lists.sourceforge.net
      and to the jbossmx forum at http://main.jboss.org/forum.jsp?forum=63 )

      i've now perused these sites:
      JMX http://java.sun.com/products/JavaManagement/
      JDMK http://www.sun.com/software/java-dynamic/
      OpenJMX http://openjmx.sourceforge.net/
      JBossMX http://www.jboss.org/developers/jboss-jbossmx.jsp
      It also seems that some of the commercial J2EE vendors (bea) and Corba vendors (iona)
      and snmp vendors (AdventNet) have things to say about JMX.

      i've read the instrumentation specification, and though it has every sign
      of design by committee (disagreement? let's just do all the choices),
      i kind of get it.

      so let's assume i manage to instrument my code.

      Now, how do I get to manage it?
      None of the JDMK, JBossMX, or OpenJMX have much to say, if anything,
      about the other two projects, so I can't figure out how much there is overlap.
      Are either of the open source projects trying to independently develop the JMX portion,
      or just the JDMK portion? Or something else?

      Suppose I have a server of my own devising, and no EJB in sight.
      In particular, i am not using a J2EE container such as jboss.
      I've instrumented my code to be manageable as one of the many flavors of JMX beans.

      1. Suppose i want to be able to manage it over an http connection, connecting
      to a special thread in my own server that just does deals with that management
      connection. It would appear that JDMK has something like that, and it seems
      JBossMX has an HtmlAdapterServer.
      I don't know how many different jars I'd have to find an link in.
      Nor do I know what extra APIs I'd have to call to get that service thread started.

      2. Now suppose that I'd like to write my own management interface using JSP, talking
      to some api (which one?), to manage my own beans. What jars would I want for that?

      3. Now suppose I'd like to manage those instrumented beans using SNMP.
      It appears JDMK does that; I don't know what else does.

      Right now, I'm caught between the marketing verbiage of Sun, and the
      nothing-but-javadoc of the open source projects, and can't figure out how
      to do those basic and fundamental 3 things.

      Maybe I'm missing some faq or howto somewhere?

      I'm sorely tempted to just bag the whole thing, and instrument my code instead
      with some open source java snmp implementation.
      At least then it is well understood and documented territory.

      -mda

        • 1. Re: can't see the jmx forest for the trees

          >
          > so let's assume i manage to instrument my code.
          >
          > Now, how do I get to manage it? None of the JDMK, JBossMX, or OpenJMX have much to
          > say, if anything, about the other two projects, so I can't figure out how much there is overlap.

          All three are implementations of the JMX spec. Sun JDMK is Sun's commercial implementation of the spec, JBossMX & OpenJMX are open source implementations of the spec. Other JMX implementations, such as IBM Tivoli JMX exist (it's free beer, but not open source).

          Each of these overlap as far as it comes to the JMX specification. They all implement the spec. In addition, they do provide extra features and tools for you to build your management applications. For example, currently none of the remote connectivity to an MBean server is defined in the spec so all implementations provide their own 'extras' to allow you to connect to the server. Most common are the HTTP Adaptor (that you can see in action when you start JBoss and point your browser to http://localhost:8082) and RMI connector that allows you to connect to the server from your management client (if you don't wish to use the HTTP interface). JDMK provides also tools that allows you to generate MBeans from your MIBs and an SNMP Adaptor that allows any SNMP management client to talk to these MBeans (the SNMP client doesn't have to be aware it is talking to an JMX MBean server, this is usually the functionality of these different adaptors). All implementations seem to provide at least some basic RMI connector functionality. JBossMX will in addition have at least SOAP connector and an asynchronous messge based connector.


          > Are either of the open source projects trying to
          > independently develop the JMX portion,

          yes.

          > or just the JDMK portion?

          JDMK is actually more than just the JMX portion (adaptors + other services, heartbeat, cascading of MBean servers among others). JBossMX will have some of those (heartbeat and cascading at least) but we're not trying to build an exact replica of JDMK, just looking at some of the services they do and pick those that look useful to us. Of course, we also want to implement other services they don't do and we see as useful.

          > Suppose I have a server of my own devising, and no EJB in sight.
          > In particular, i am not using a J2EE container such as jboss.
          > I've instrumented my code to be manageable as one of the many flavors of JMX beans.
          >
          > 1. Suppose i want to be able to manage it over an http connection, connecting
          > to a special thread in my own server that just does deals with that management
          > connection.

          In such case it would be easiest to pick a HTTP Adaptor and register it to the MBean server (see http://localhost:8082 for JBoss). The HTTP Adaptor is implemented as an MBean you register to the server just like any other MBean. You call it's start() operation and it will service the HTTP requests to manage the MBeans. The API to do this is not currently standardized (I think is a target for the next 1.5 release of the JMX spec) so the API calls may vary a bit between implementations (for example start() vs startListener() to start the adaptor).

          > 2. Now suppose that I'd like to write my own
          > management interface using JSP, talking
          > to some api (which one?)

          If you want to build your own HTML view then the API you want to talk to is the JMX API (javax.management.*) and specifically to the MBeanServer interface.

          > What jars would I want for that?

          In this case you're probably good with only the jars that contain the JMX specification implementation.


          > 3. Now suppose I'd like to manage those instrumented beans using SNMP.
          > It appears JDMK does that; I don't know what else
          > does.

          In this case you would register an SNMP Adaptor MBean to the MBean server (similar to what you do with HTTP Adaptors).

          > Maybe I'm missing some faq or howto somewhere?

          ObPlug: JMX: Managing J2EE Applications with Java Management Extensions
          http://www.amazon.com/exec/obidos/ASIN/0672322889/104-6670791-7933546

          Should clear things up a bit as far as it comes to the distributed services of JMX. The JBossMX is currently in alpha stage for 1.0 release so we don't have any much documentation yet, although questions on this forum seems to get answered quite well.

          Hope this helps,

          -- Juha