public void setAttribute( PrintWriter writer, String onameStr, String att, String val ) { try { ObjectName oname=new ObjectName( onameStr ); String type=registry.getType(oname, att); Object valueObj=registry.convertValue(type, val ); mBeanServer.setAttribute( oname, new Attribute(att, valueObj)); writer.println("OK - Attribute set"); } catch( Exception ex ) { writer.println("Error - " + ex.toString()); } }
/** * Sets an MBean attribute's value. */ private void setAttributeInternal(String onameStr, String attributeName, String value) throws OperationsException, MBeanException, ReflectionException { ObjectName oname = new ObjectName(onameStr); String type = registry.getType(oname, attributeName); Object valueObj = registry.convertValue(type, value); mBeanServer.setAttribute(oname, new Attribute(attributeName, valueObj)); }
public void setAttribute( PrintWriter writer, String onameStr, String att, String val ) { try { ObjectName oname=new ObjectName( onameStr ); String type=registry.getType(oname, att); Object valueObj=registry.convertValue(type, val ); mBeanServer.setAttribute( oname, new Attribute(att, valueObj)); writer.println("OK - Attribute set"); } catch( Exception ex ) { writer.println("Error - " + ex.toString()); ex.printStackTrace(writer); } }
public void setAttribute( PrintWriter writer, String onameStr, String att, String val ) { try { ObjectName oname=new ObjectName( onameStr ); String type=registry.getType(oname, att); Object valueObj=registry.convertValue(type, val ); mBeanServer.setAttribute( oname, new Attribute(att, valueObj)); writer.println("OK - Attribute set"); } catch( Exception ex ) { writer.println("Error - " + ex.toString()); } }
public void setAttribute( PrintWriter writer, String onameStr, String att, String val ) { try { ObjectName oname=new ObjectName( onameStr ); String type=registry.getType(oname, att); Object valueObj=registry.convertValue(type, val ); mBeanServer.setAttribute( oname, new Attribute(att, valueObj)); writer.println("OK - Attribute set"); } catch( Exception ex ) { writer.println("Error - " + ex.toString()); } }
/** * Sets an MBean attribute's value. */ private void setAttributeInternal(String onameStr, String attributeName, String value) throws OperationsException, MBeanException, ReflectionException { ObjectName oname=new ObjectName( onameStr ); String type=registry.getType(oname, attributeName); Object valueObj=registry.convertValue(type, value ); mBeanServer.setAttribute( oname, new Attribute(attributeName, valueObj)); }
/** * Sets an MBean attribute's value. */ private void setAttributeInternal(String onameStr, String attributeName, String value) throws OperationsException, MBeanException, ReflectionException { ObjectName oname=new ObjectName( onameStr ); String type=registry.getType(oname, attributeName); Object valueObj=registry.convertValue(type, value ); mBeanServer.setAttribute( oname, new Attribute(attributeName, valueObj)); }
/** * Sets an MBean attribute's value. */ private void setAttributeInternal(String onameStr, String attributeName, String value) throws OperationsException, MBeanException, ReflectionException { ObjectName oname = new ObjectName(onameStr); String type = registry.getType(oname, attributeName); Object valueObj = registry.convertValue(type, value); mBeanServer.setAttribute(oname, new Attribute(attributeName, valueObj)); }
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); } }
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); } }
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 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); } }
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 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); } }
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); } }
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( CoyoteLogger.MODELER_LOGGER.isDebugEnabled()) CoyoteLogger.MODELER_LOGGER.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 ) { CoyoteLogger.MODELER_LOGGER.attributeNotFound(attName, objectName); } else { Object valueO=registry.convertValue( type, value); server.setAttribute(oname, new Attribute(attName, valueO)); } } catch( Exception ex) { CoyoteLogger.MODELER_LOGGER.errorProcessingAttribute(attName, value, objectName, ex); } }