/**
* Return the MBean Names of the set of defined environment entries for this
* web application
*/
public String[] getEnvironments() {
ContextEnvironment[] envs = ((NamingResources) this.resource).findEnvironments();
ArrayList<String> results = new ArrayList<String>();
for (int i = 0; i < envs.length; i++) {
try {
ObjectName oname = MBeanUtils.createObjectName(managed.getDomain(), envs[i]);
results.add(oname.toString());
} catch (MalformedObjectNameException e) {
IllegalArgumentException iae = new IllegalArgumentException(
"Cannot create object name for environment " + envs[i]);
iae.initCause(e);
throw iae;
}
}
return results.toArray(new String[results.size()]);
}
NamingResourcesMBean.java 文件源码
java
阅读 18
收藏 0
点赞 0
评论 0
项目:lazycat
作者:
评论列表
文章目录