I get a ThreadMXBean proxy for remote JVM as
ObjectName objName = ManagementFactory.getThreadMXBean().getObjectName() ;
ThreadMXBean proxy = JMX.newMBeanProxy(MBeanServerConnection, objName, ThreadMXBean.class);
However, when I call the following, it says it can't convert from CompositeDataSupport
to ThreadInfo
.
ThreadInfo tInfo = proxy. getThreadInfo(true, true);
Shouldn't the proxy take care of all the conversion? Besides, I'm calling the getThreadInfo()
on effectively ThreadMXBean.