Hashtable<String, Object> env = new Hashtable<String, Object>();
String[] credentials = new String[2];
credentials[0] = userName;
credentials[1] = password;
env.put(JMXConnector.CREDENTIALS, credentials);
JMXConnector connector = JMXConnectorFactory.connect(
serviceURL, env);
mbServerConn = connector.getMBeanServerConnection();
// retrieve the mbean name to the agent-car-jmx plugin
if(PATH == null) {
Set<ObjectName> mbeanNames = mbServerConn.queryNames(new ObjectName("*:name=MasterRemoteControlJMX,*"), null);
for(Iterator<ObjectName> it = mbeanNames.iterator(); it.hasNext(); ) {