Using the Platform MBean Server and Platform MBeans 规格严格

Using the Platform MBean Server and Platform MBeans

http://docs.oracle.com/javase/1.5.0/docs/guide/management/mxbeans.html

http://mabusyao.iteye.com/blog/1070210

http://www.java2s.com/Code/Java/Development-Class/ExampleofusingthejavalangmanagementAPItosortthreadsbyCPUusage.htm

http://www.ibm.com/developerworks/java/library/j-mxbeans/

项目部署了,可惜现场需要VPN上去,怪麻烦的,很多程序都开通MBean了,于是我就打算在tomcat上写几个Servlet,出问题时候能够定位后台

程序的堆栈和日志信息,这就要求用MBean了。1.5以后提供ThreadXMBean,上网搜了这几篇文章,尤其是sun和ibm的这两篇文章写的太好了

,其实这东西都是工具,也就是用用了。本质也就是暴露管理端了,之前用MBean都是封装的,从1.6的JMX里面扣出来用的,都是调用接口,ibm

的文章给出了其他的思路。

原文地址:https://www.cnblogs.com/diyunpeng/p/2407854.html