views:

62

answers:

0

I have a Java process running on a remote machine, and the process sets up some mbeans. I also have jstatd running on that machine as the same user as the Java process. (The mbeans can be set up programmatically or using -Dcom.sun.management.jmxremote... etc, this doesn't appear to make a difference).

VisualVM is able to make a jstatd connection to the process, which it discovers automatically, but this means I don't get access to mbeans or, for example, the CPU history chart. Alternatively I can create an explicit JMX connection, which gives me the usual range of useful tools, but I want for the application to be assigned a random JMX port when it starts, this config can't be static.

Is there any way to get VisualVM to auto-connect to my process via JMX? This would require it to auto-discover the JMX ports, but I would have thought jstatd could do that. Does anyone know of any plugins for visualvm to automate this?