-
1. Re: Java Client connecting to remote host
tnas Jul 4, 2013 1:46 PM (in response to tnas)Actually, I've noticed the second approach can be rewritten as follow:
----------------------------------------------------------------------------------------------------------------------------------
Approach 2:
int port = 9999;
String urlString = "service:jmx:rmi:///jndi/rmi://" + host + ":" + port + "/jmxrmi";
JMXServiceURL serviceUrl = new JMXServiceURL(urlString);
JMXConnector jmxconn = JMXConnectorFactory.connect(serviceUrl, null);
----------------------------------------------------------------------------------------------------------------------------------
But some questions persists.
1. Why does first approach works at the port 1090 and second works at the 9999?
2. Why does first approach works with "/jmxconnector" in the URL and the second works with "/jmxrmi" in it?