karlht: Mu the giggling dragon, as drawn by Max Toth in 1992-ish (Default)
Karl T. ([personal profile] karlht) wrote2007-05-01 12:00 pm

For the geeks among you

Why I don't code in Java:


         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.)

Post a comment in response:

(will be screened)
(will be screened if not on Access List)
(will be screened if not on Access List)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting