public void endExample()
{
try
{
System.out.println("Cleaning up......");
// this query will return the set of mbeans which have a class attribute of "management*" which is our MBeans
Set mbeanSet = m_server.queryMBeans(null, Query.initialSubString(Query.classattr(), Query.value("management*")));
for (Iterator i = mbeanSet.iterator(); i.hasNext();)
{
m_server.unregisterMBean(((ObjectInstance)i.next()).getObjectName());
}
// release the relationService
m_server.unregisterMBean(m_relationObjectName);
// release the MBeanServer
MBeanServerFactory.releaseMBeanServer(m_server);
System.exit(0);
}
catch (Exception ex)
{
ex.printStackTrace();
System.exit(1);
}
}
RelationServiceExample.java 文件源码
java
阅读 43
收藏 0
点赞 0
评论 0
项目:windup-rulesets
作者:
评论列表
文章目录