(this same message is being sent to both email@example.com
and to the jbossmx forum at http://main.jboss.org/forum.jsp?forum=63 )
i've now perused these sites:
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.
> 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,
> 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
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
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
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,