private static void checkMBeansLoadedSuccessfully(Set mbeans) throws ServiceNotFoundException
{
// MLet.getMBeansFromURL returns a Set containing exceptions if an MBean could not be loaded
boolean allLoaded = true;
for (Iterator i = mbeans.iterator(); i.hasNext();)
{
Object mbean = i.next();
if (mbean instanceof Throwable)
{
((Throwable)mbean).printStackTrace();
allLoaded = false;
// And go on with the next
}
else
{
// Ok, the MBean was registered successfully
System.out.println("Registered MBean: " + mbean);
}
}
if (!allLoaded) throw new ServiceNotFoundException("Some MBean could not be loaded");
}
Main.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:cacheonix-core
作者:
评论列表
文章目录