开发者

jvisualvm - automatically (JMX) reconnect to application?

Is there any way to reconnect disconnected JMX connection in jvisualvm? When monitored JMX enabled application restarts, I have to restart jvisualvm to reconnect it. Am I missing something?

Here are my jvisualvm details:

Version: 1.6.0_22 (Build 100326); platform 091221-4fc006d17cb1

System: Linux (2.6.35-23-gene开发者_JAVA百科ric) , amd64 64bit Java: 1.6.0_22; Java HotSpot(TM) 64-Bit Server VM (17.1-b03, mixed mode)


there is JIRA for that feature: https://java.net/jira/browse/VISUALVM-120


At least in the current version (1.8.0_45 (Build 1380-140910)), if you check the "Save security credentials" checkbox in the "Add JMX Connection..." dialog, it will attempt to reconnect to the remote server when visualvm is next started. So, if you get disconnected, you can quit out of visualvm and relaunch it in order to reconnect. I know that's not quite what you were asking for, but at least it works. The fact that the feature you were hoping for still hasn't been implemented over 10 years after it was first requested is pretty sad. My guess is that they're trying to get people to buy Mission Control instead.

The original issue for this at java.net no longer exists, but this appears to be the equivalent on GitHub. Go give it a thumbs up if you care about it being completed/fixed.


I don't know that there is a way to do that. As a workaround, you could create a DOS batch file (or a bash script on Linux) that monitors the JMX port and if the port disappears it can kill jvisualvm and restart it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜