List of usage examples for javax.management MBeanServerConnection setAttributes
public AttributeList setAttributes(ObjectName name, AttributeList attributes) throws InstanceNotFoundException, ReflectionException, IOException;
Sets the values of several attributes of a named MBean.
From source file:org.helios.collector.jmx.connection.AbstractMBeanServerConnectionFactory.java
/** * Sets the value of a list of attributes * @param objectName//w w w . j a v a 2 s .c o m * @param attributeList * @return * @throws InstanceNotFoundException * @throws ReflectionException * @throws IOException */ @Override @ManagedOperation public AttributeList setAttributes(ObjectName objectName, AttributeList attributeList) throws InstanceNotFoundException, ReflectionException, IOException { validateConn(); MBeanServerConnection conn = null; try { conn = getPooledConnection(); return conn.setAttributes(objectName, attributeList); } catch (MBeanServerConnectionFactoryException e) { throw new RuntimeException("Failed to get pooled connection", e); } finally { try { this.returnPooledConnection(conn); } catch (Exception e) { log.debug(e.getMessage()); } } }