tags:

views:

60

answers:

1

I have a Java object which is exposed via JMX and I'm wondering when I invoke an operation on it using JMX (i.e. via JConsole or something similar) if that operation occurs in a separate thread or not.

I need to know this so I know whether or not I need to make that operation in my Java code thread-safe (i.e. accessing an ArrayList, etc).

A: 

Well JConsole is a separate process from the target JVM, and so the JVM would have to spawn a new thread to service the request. If multiple JConsole operations come in al the same time, then the target code would have to be thread safe.

skaffman