Re: remote method calling JMX 1.0
"Simone Bordet" <[email protected]>
| Newsgroups | gmane.comp.java.mx4j.user |
|---|---|
| Message-ID | <[email protected]> |
Hi,
> Hi Simon,
> Thanks for your reply.
> I have one more doubt.
>
> 1) Is it possible to connect to a remote method (which is on differet
> machine) using HTTP protocal in MX4J?
Yes, but not using JMX 1.0, nor using MX4j's HTTPAdaptor.
MX4J ships 3 JMXConnectors based on HTTP, for the burlap, hessian and
soap protocols, but once again, those are working only with JMX 1.2.
> If yes
>
> I have seen the HttpAdaptor examples.
>
> i believe the below code is used for the remote method calling through RMI
> protocol.
>
> String path = "service:jmx:rmi:///jndi/rmi://localhost:8999/jmxrmi";
> JMXServiceURL url = new JMXServiceURL(path);
> JMXConnector cntor = JMXConnectorFactory.connect(url);
> MBeanServerConnection connection = cntor.getMBeanServerConnection();
> cntor.invoke(ObjectName objName, "method name",Object[] , String[]);
>
> What could be the sample code for remote method call through HTTP protocol?
>
> while using HttpAdaptor in client code ...
> HttpAdaptor adapter = new HttpAdaptor();
> adapter.setPort(8080);
> adapter.setHost("192.140.20.13"); // need to set the host name where the
> remote method resides??
>
> --Can you please give me a clarification?
You can use HTTP as transport protocol, but not with MX4J's
HTTPAdaptor (since there is no implementation of a JMXConnector for
that -- you have to write one).
Simon
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642