/**
* Create, register, and return an MBean for this
* <code>Context</code> object.
*
* @param context The Context to be managed
*
* @exception Exception if an MBean cannot be created or registered
*/
public static ModelMBean createMBean(Context context)
throws Exception {
String mname = createManagedName(context);
ManagedBean managed = registry.findManagedBean(mname);
if (managed == null) {
Exception e = new Exception("ManagedBean is not found with "+mname);
throw new MBeanException(e);
}
String domain = managed.getDomain();
if (domain == null)
domain = mserver.getDefaultDomain();
ModelMBean mbean = managed.createMBean(context);
ObjectName oname = createObjectName(domain, context);
mserver.registerMBean(mbean, oname);
return (mbean);
}
MBeanUtils.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:jerrydog
作者:
评论列表
文章目录