Just wondering about the code snippet above, are you referring the code as in jconsole context?
Assuming we also need to start the application with jmx properties for the JMX part to work?
Is it possible to enable jmx authentication = true and validate user/password against LDAP? This is to secure JMX operations like start/stop etc. [so that only those who know the user/pwd can be allowed to carry out operations etc]