Can I instrument Java code remotely using JMX?
I would like to be able to instrument Java code without adding开发者_如何学JAVA any agents or jars to the application I am monitoring (Weblogic in my case). Is this possible?
You can create custom MBeans that expose fields in your application and monitor these using a tool like JConsole, but this is pretty inflexible when used as a method of profiling. It means whatever instrumentation you have is built into your application. The advantage of using agents is they add instrumentation to your classes on the fly, and it can easily be added or removed dynamically.
精彩评论