For the geeks among you
May. 1st, 2007 12:00 pmWhy I don't code in Java:
(No, it's not my code. But I will have to test it, eventually. And I really feel for the fellow who has to write this stuff.)
String hp = isa.getHostName() + ":" + isa.getPort();
String s = "service:jmx:rim://" + hp + "/jndi/rmi://" + hp + "/jmxrmi";
JMXServiceURL url = new JMXServiceURL(s);
String login = getJMXUsername(isa);
String password = getJMXPassword(isa);
Map<String,Object> env = new HashMap<String,Object>(1);
String[] creds = new String[] { login, password };
env.put(JMXConnector.CREDENTIALS, creds);
JMXConnector jmxc = JMXConnectorFactory.connect(url, env);
// jmxc = new RMIJMXConnector(host, port, login, password); /* sigh */
(No, it's not my code. But I will have to test it, eventually. And I really feel for the fellow who has to write this stuff.)