Map<String, Class<? extends SaslClientFactory>> map = new HashMap<String, Class<? extends SaslClientFactory>>();
Class<?> clazz = Class.forName("org.apache.qpid.management.ui.sasl.CRAMMD5HashedSaslClientFactory");
map.put("CRAM-MD5-HASHED", (Class<? extends SaslClientFactory>) clazz);
Security.addProvider(new JCAProvider(map));
CallbackHandler handler = new UsernameHashedPasswordCallbackHandler(
getManagedServer().getUser(),
getManagedServer().getPassword());
_env.put("jmx.remote.profiles", SASL_CRAMMD5);
_env.put("jmx.remote.sasl.callback.handler", handler);
}