开发者

jmx mbean thread safety

if i have a class, that is also a mbean, and i use functions of the class in my code, in only one thread, and also call a function by jm开发者_C百科x, should i synchronize that code? thanks


The code should be thread-safe, yes. If you choose to make it thread-safe using synchronized, then that's up to you.

MBeans that are invoked via JMX will be invoked by the container, using its own threads, separate from your own code's threads.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜