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的代码。