if (methodsToExclude != null)
{
// Warn that <exclude-properties> will be ignored.
if (includeMethods != null)
{
RemotingDestination dest = (RemotingDestination)getDestination();
if (Log.isWarn())
Log.getLogger(LogCategories.CONFIGURATION).warn("The remoting destination '" + dest.getId() + "' contains both <include-methods/> and <exclude-methods/> configuration. The <exclude-methods/> block will be ignored.");
}
// Excludes must be processed regardless of whether we add them or not to avoid 'Unused tags in <properties>' exceptions.
List methods = methodsToExclude.getPropertyAsList(METHOD_ELEMENT, null);
if ((methods != null) && !methods.isEmpty())
{
int n = methods.size();
for (int i = 0; i < n; i++)
{
ConfigMap methodSettings = (ConfigMap)methods.get(i);
String name = methodSettings.getPropertyAsString(NAME_ELEMENT, null);
RemotingMethod method = new RemotingMethod();
method.setName(name);
// Check for security constraint.
String constraintRef = methodSettings.getPropertyAsString(ConfigurationConstants.SECURITY_CONSTRAINT_ELEMENT, null);
// Conditionally add, only if include methods are not defined.
if (includeMethods == null)
{
if (constraintRef != null)
{
RemotingDestination dest = (RemotingDestination)getDestination();
if (Log.isWarn())
Log.getLogger(LogCategories.CONFIGURATION).warn("The method '" + name + "' for remoting destination '" + dest.getId() + "' is configured to use a security constraint, but security constraints are not applicable for excluded methods.");
}
addExcludeMethod(method);
}
}
}