if (vsBean == null) {
return;
}
ElementProperty allow = vsBean.getElementPropertyByName(
"allowRemoteHost");
ElementProperty deny = vsBean.getElementPropertyByName(
"denyRemoteHost");
if ((allow != null && allow.getValue() != null)
|| (deny != null && deny.getValue() != null)) {
remoteHostValve = new RemoteHostValve();
}
if (allow != null && allow.getValue() != null) {
_logger.fine("Allowing access to " + getID()+ " from " +
allow.getValue());
if (httpProtocol == null || !httpProtocol.isDnsLookupEnabled()) {
_logger.log(Level.WARNING,
"webcontainer.allowRemoteHost.dnsLookupDisabled",
getID());
}
remoteHostValve.setAllow(allow.getValue());
}
if (deny != null && deny.getValue() != null) {
_logger.fine("Denying access to " + getID()+ " from " +
deny.getValue());
if (httpProtocol == null || !httpProtocol.isDnsLookupEnabled()) {
_logger.log(Level.WARNING,
"webcontainer.denyRemoteHost.dnsLookupDisabled",
getID());
}
remoteHostValve.setDeny(deny.getValue());
}
if (remoteHostValve != null) {
// Remove existing RemoteHostValve (if any), in case of a reconfig
Valve[] valves = getValves();