if (className == null) {
logger.log(Level.WARNING, VALVE_MISSING_CLASS_NAME,
new Object[]{valveName, getName()});
return;
}
Object valve = loadInstance(className);
if (valve == null) {
return;
}
if (!(valve instanceof GlassFishValve) &&
!(valve instanceof Valve)) {
logger.log(Level.WARNING, VALVE_CLASS_NAME_NO_VALVE,
className);
return;
}
WebProperty[] props = valveDescriptor.getWebProperty();
if (props != null && props.length > 0) {
for (WebProperty property: props) {
String propName = getSetterName(
property.getAttributeValue(WebProperty.NAME));
if (propName != null && propName.length() != 0) {
String value = property.getAttributeValue(
WebProperty.VALUE);
try {
Method method = valve.getClass().getMethod(
propName, String.class);
method.invoke(valve, value);
} catch (NoSuchMethodException ex) {
String msg = rb.getString(VALVE_SPECIFIED_METHOD_MISSING);
msg = MessageFormat.format(msg,