public String[] getValves() throws Exception {
Registry registry = MBeanUtils.createRegistry();
StandardHost host = (StandardHost) this.resource;
String mname = MBeanUtils.createManagedName(host);
ManagedBean managed = registry.findManagedBean(mname);
String domain = null;
if (managed != null) {
domain = managed.getDomain();
}
if (domain == null)
domain = mserver.getDefaultDomain();
Valve [] valves = host.getValves();
String [] mbeanNames = new String[valves.length];
for (int i = 0; i < valves.length; i++) {
mbeanNames[i] =
MBeanUtils.createObjectName(domain, valves[i]).toString();
}
return mbeanNames;
}
Return the MBean Names of the Valves assoicated with this Host |