`
izuoyan
  • 浏览: 9004157 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

一个不错的JMX实现-XMOJO

阅读更多

http://www.xmojo.org/products/xmojo/index.html

Highlights of XMOJO

Complete implementation of JMX specification, version 1.0
Multi-management protocol support with RMI and HTTP adaptors
Tested successfully the JMX instrumentation with different application data sources
Servlets, JSPs, EJBs, Java APIs, databases, log files
Tested with different application and integration platforms
WebLogic, WebSphere, JBoss, Oracle9iAS, Tibco Hawk, etc.
Works well with enterprise management systems - CA, Tivoli, BMC, HP etc.
Tested by converting JMX notifications to SNMP traps
Manager tool for testing the developed JMX agents - MBean Browser (RMI client)
Good documentation with illustrative examples & tutorial


一个不错的jmx实现,OpenSource可随便下载,实现jmx 1.0规范,提供了RMI、HTTP适配器。跑了以下他ModelBean的demo,非常简单,提供了现成的批处理文件编译和运行,不用设置任何东西,就可以运行来了。http适配器的效果也不错,比sun提供的那个界面友好多了,而且应该可以订制管理的界面,提供了国际化的资源文件,应该可以方便的做国际化处理。RMI CLIENT使用swing编写的应用程序,界面也非常友好,感觉真是不错,文档也比较详细,只是对ModelMBeanInfo的xml配置文件没有发现tld说明。
看了一下他的ModelBean,竟然可以支持两种方式的创建 ModelMBeanInfo:

Creation of ModelMBeanInfo Object
There are two options to create a ModelMBeanInfo object:

1. Constructing the ModelMBeanInfo using the available API.
2. Writing an XML file and converting this XML file into a ModelMBeanInfo using some utility method.

一种可以使用jmx api 获取ModelMBeanInfo,需要些很多的需要为你管理的对象的属性、方法等写很多的Descriptor。另一种直接写一个xml配置文件完事。
我们可以看到代码:
name = new ObjectName("ModelDomain:name=serverInfo");
ModelMBeanInfo mbeanInfo = null;

if(isMBeanInfoFromXML)
{
System.out.println("MBeanInfo obtained from xml file");
mbeanInfo = Utilities.convertXmlToModelMBeanInfo(
"xml/ServerInfo.xml");
}
else
{
System.out.println("MBeanInfo obtained from the ModelServerInfo class");
mbeanInfo = ModelServerInfo.getMBeanInfo(name, "ServerInfoMBean");
}
这是使用两种方式取得ModelMBeanInfo的代码。

&amp;amp;lt;!-- google_ad_client = "pub-9232855773311077"; google_ad_width = 336; google_ad_height = 280; google_ad_format = "336x280_as"; google_ad_channel =""; //--&amp;amp;gt; <iframe name="google_ads_frame" marginwidth="0" marginheight="0" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-9232855773311077&amp;dt=1110449438421&amp;format=336x280_as&amp;output=html&amp;u_h=768&amp;u_w=1024&amp;u_ah=738&amp;u_aw=1024&amp;u_cd=32&amp;u_tz=480&amp;u_his=19&amp;u_java=true" frameborder="0" width="336" scrolling="no" height="280" allowtransparency="65535"></iframe>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics