I have been trying to attach Jolokia dynamically using the following command:
java -jar jolokia-jvm-1.3.4-agent.jar start <myapplication_regex>
This works successfully. But on application restart, Jolokia terminates.
Is there any workaround for handling the application restart case?
Try to add -javaagent:/path/to/jolokia-jvm-<version>-agent.jar
to the application properties so that it gets attached on restart.