if (isVmConnector()) {
// Check for SSL config on reconnection only
if (stub == null) {
checkSslConfig();
}
this.jmxc = new RMIConnector(stub, null);
jmxc.connect();
} else {
this.jmxc = JMXConnectorFactory.connect(jmxUrl);
}
} else {
Map<String, String[]> env = new HashMap<String, String[]>();
env.put(JMXConnector.CREDENTIALS, new String[] { userName, password });
if (isVmConnector()) {
// Check for SSL config on reconnection only
if (stub == null) {
checkSslConfig();
}
this.jmxc = new RMIConnector(stub, null);
jmxc.connect(env);
} else {
this.jmxc = JMXConnectorFactory.connect(jmxUrl, env);
}
}