Using the same connection object in multiple threads

Is it okay for multiple threads to share a single MBeanServerConnection object to invoke a method in an mbean? I have a thread pool with a number of threads in there, and each of them will run a job that invokes a method in an mbean. For better efficiency, I'm thinking if I could construct a single connection object first, then pass it to all worker threads so that it doesn't have to be created every time. Are there any side effects?

Thanks for any pointers.

[477 byte] By [Joannea] at [2007-11-26 16:31:31]
# 1

This is an absolutely standard and supported usage of the JMX Remote API. It should work fine. The only thing to look out for is in your MBean - obviously if multiple threads can be invoking its methods at the same time, then you need to design it to be thread-safe, in the same way as you would for any other Java object.

emcmanusa at 2007-7-8 22:56:03 > top of Java-index,Core,Monitoring & Management...
# 2
Got it, thanks a lot!
Joannea at 2007-7-8 22:56:03 > top of Java-index,Core,Monitoring & Management...