I have a spring based web-application that needs to get data from ActiveMQ via a JMX connection. I am using MBeanServerConnectionFactoryBean(in Spring) to get various MBean attributes from ActiveMQ.

I have only one MBeanServerConnectionFactoryBean as a member variable, which is used to get the data. If multiple requests/threads come concurrently will there be any issues. Will there be any race condition.

Please suggest the best way to keep the code thread-safe.

Thanks