String[] credentials = new String[] { "monitorRole" , "QED" };
cli_env.put("jmx.remote.credentials", credentials);
jmxc = JMXConnectorFactory.connect(url, cli_env);
Subject delegationSubject =
new Subject(true,
Collections.singleton(new JMXPrincipal("delegate")),
Collections.EMPTY_SET,
Collections.EMPTY_SET);
MBeanServerConnection mbsc =
jmxc.getMBeanServerConnection(delegationSubject);
// Get domains from MBeanServer