I'm trying to create a diaganostic profile programmatically .
I didn't see any example like this. My purpose is to create a profile like in the ' Visualizer ' tool.
I'm trying to use these lines:
I think there is inconsistency in the typs of the connection mbean. Neither of of them works fine:
The first one works fine for getting troughput , averageLatency and so on , BUT, when i try to terminate ( unregister from the mbean server ),
and than re-connect again, the numbers i'm getting are wrong.
In the second type (ManagementFactory.getPlatformMBeanServer() ) , when I want to use as a profile creator ( like in the 'Visualizer' tool - which works fine )
I don't know which of the types to use.
What is your recommendation to to use : for temintinag the probeRuntime, and for making a profile .
again, neither of them works all the way!