I have a JMX server started by JVM process that can be optionally secured (for now its not, so I'm ready to consider any extensible way for it). For example as an option I looked at official tutorial and its ok for now to use user/password authentication. The MBeans are deployed via spring (annotations approach is used).
Now I would like to get from within my MBean the user name for some additional actions. Is it possible to do in JMX technology at all? If Yes how? :)
Example:
public class MyMBean {
public void myOp() {
String userName = ... ?; // or whatever object that can bring me the name
makeSomethingWithUserName ( userName );
doMyStuffHere();
}
}
I've found this tutorial but it seems to be glassfish specific and I'm looking for plain java based solution.
Thanks a lot and have a nice day