private void processAttribute(MBeanServer server,
Node descN, String objectName ) {
String attName=DomUtil.getAttribute(descN, "name");
String value=DomUtil.getAttribute(descN, "value");
String type=null; // DomUtil.getAttribute(descN, "type");
if( value==null ) {
// The value may be specified as CDATA
value=DomUtil.getContent(descN);
}
try {
if( log.isDebugEnabled())
log.debug("Set attribute " + objectName + " " + attName +
" " + value);
ObjectName oname=new ObjectName(objectName);
// find the type
if( type==null )
type=registry.getType( oname, attName );
if( type==null ) {
log.info("Can't find attribute " + objectName + " " + attName );
} else {
Object valueO=registry.convertValue( type, value);
server.setAttribute(oname, new Attribute(attName, valueO));
}
} catch( Exception ex) {
log.error("Error processing attribute " + objectName + " " +
attName + " " + value, ex);
}
}
MbeansSource.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:lams
作者:
评论列表
文章目录