Security jmx mbean thread

If I have a class that is also mbean and I use class functions in my code in only one thread and also call jmx function, should I synchronize this code? thank

+5
source share
1 answer

The code should be thread safe, yes. If you decide to make it thread safe with synchronized, then it is up to you.

MBeans invoked through JMX will be invoked by the container using their own threads, separate from your own code threads.

+4
source

All Articles