From: Bordet, S. <Sim...@co...> - 2002-02-17 13:49:06
|
Hi, > so let's assume i manage to instrument my code. >=20 > Now, how do I get to manage it? Normally you manage your components by means of some JMX adaptor or = connector, that have been foreseen by the spec, v 1.0, but not yet = defined. In OpenJMX we provide a HTTP connector and an RMI connector, both = supporting SSL, the RMI one also over IIOP. > 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=20 > there is overlap. > Are either of the open source projects trying to=20 > independently develop the JMX portion, > or just the JDMK portion? Or something else? All implement the JMX specification, v 1.0, and offer some more extra = feature. > 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=20 > flavors of JMX beans. >=20 > 1. Suppose i want to be able to manage it over an http=20 > connection, connecting > to a special thread in my own server that just does deals=20 > with that management > connection. It would appear that JDMK has something like=20 > 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=20 > service thread started. On client side you need a browser.=20 In OpenJMX just start the HTTPAdaptor as specified in the documentation = (jar is openjmx-tools.jar). There is no extra API on server side, you use the JMX API to create and = instantiate the HTTP adaptor, see here for details = (http://openjmx.sourceforge.net/docs/ch03.html#d0e327). > 2. Now suppose that I'd like to write my own management=20 > interface using JSP, talking > to some api (which one?), to manage my own beans. What jars=20 > would I want for that? If you want to write JSP interface for a management application, you = normally rely on the RMI connector to communicate to the JMX agent, = although it should be possible also with the HTTP adaptor. OpenJMX's HTTPAdaptor is fully customizable via XSLT, so you can change = the view as you like. Again, since adaptors and connectors are not defined by the spec, each = implementation will provide specific jars. In OpenJMX you need both = openjmx.jar and openjmx-tools.jar. The API are uniquely those defined by the RMIConnector class, if you use = the RMI connector. For the HTTP adaptor, you need to look at the URL = syntax, refer to the link above for OpenJMX's. > 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. Not OpenJMX (yet) nor JBossMX (afaik). > Right now, I'm caught between the marketing verbiage of Sun, and the=20 > nothing-but-javadoc of the open source projects, and can't=20 > figure out how > to do those basic and fundamental 3 things. >=20 > Maybe I'm missing some faq or howto somewhere? I think you are going faster than what JMX specification expert decided = to put in the 1.0 version. You are trying to use MBeans remotely and this is not defined by the = spec yet, so every implementation provides non-standard tools to do so. > I'm sorely tempted to just bag the whole thing, and=20 > instrument my code instead > with some open source java snmp implementation. > At least then it is well understood and documented territory. My opinion is don't do so. JMX is powerful, and allow you to manage your code as well as have a = standard framework for server-side applications. It will become even more powerful, as great changes are planned for = "Tiger" (JDK 1.5), and JSR 160 (http://jcp.org/jsr/detail/160.jsp) is = right now defining exactly for you are looking for, and it is very = active (I'm part of the expert group for that JSR). As a final word, on this list you will find the help needed to start to = use JMX at its full extent, and solutions to your problems may help = others and be incorporated as examples in OpenJMX. Hope helped. Cheers Simon |