-
1. Re: JMX over HTTP?
adrian.brock Apr 16, 2003 5:26 AM (in response to ejain)Yes in 3.2
It hasn't been backported correctly to 3.0
so it doesn't work.
Use the following steps:
server/default/deploy/jmx-invoker-adaptor-service.xml/META-INF/jboss-service.xml
add the following mbean config
<!-- Where to bind the proxy -->
jmx/invoker/HttpAdaptor
<!-- The interface to expose at the proxy -->
javax.management.MBeanServer
<!-- 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
java.naming.factory.initial=org.jboss.naming.HttpNamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=http://localhost:8080/invoker/JNDIFactory
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
Regards,
Adrian -
2. Re: JMX over HTTP?
juhalindfors Apr 16, 2003 6:30 AM (in response to ejain)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?
ejain Apr 16, 2003 5:22 PM (in response to ejain)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?
ejain Apr 16, 2003 5:27 PM (in response to ejain)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?