Re: remote method calling JMX 1.0

rajeshkannan <[email protected]>
Newsgroups gmane.comp.java.mx4j.user
Message-ID <[email protected]>
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?

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?

Rajeshkannan





simonebordet wrote:
> 
> Hi,
> 
>> Hi Simon,
>> Thank you for you reply.
>> I have once more query on this same topic.
>> Remote method calling is possible using XML-RPC communication. Through
>> Apache's xmlrpc-1.2-b1.jar we can invoke a method which is in remote
>> class.Shall we use the same XML-RPC communication to invoke the remote
>> mbean(mbean in different server) ?
> 
> I cannot answer here.
> XML-RPC (as defined at http://www.xmlrpc.com) may be a solution.
> Another one is using java.beans.XMLEncoder/Decoder + java.net.URL.
> Another is SOAP.
> I bet there are another million out there.
> Choosing which one fits you depends really on your project.
> Google (the search engine) may help you.
> 
> Simon
> -- 
> http://bordet.blogspot.com
> 
> -------------------------------------------------------------------------
> 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
> _______________________________________________
> Mx4j-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mx4j-user
> 
> 

-- 
View this message in context: http://www.nabble.com/remote-method-calling-JMX-1.0-tf2195442.html#a6191774
Sent from the MX4J - User forum at Nabble.com.


-------------------------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.