} finally {
// and make sure to close the input stream after the schema has been loaded
IOHelper.close(is);
}
ValidatingProcessor validator = new ValidatingProcessor();
validator.setSchemaAsByteArray(bytes);
LOG.debug("{} using schema resource: {}", this, resourceUri);
configureValidator(validator, uri, remaining, parameters);
// force loading of schema at create time otherwise concurrent
// processing could cause thread safe issues for the javax.xml.validation.SchemaFactory
validator.loadSchema();
return new ProcessorEndpoint(uri, this, validator);
}