// TODO: Ideally this processing should happen in BVal code. But, the ValidationParser loads the validation xml and
// mapping files using the classloader and these files are not always available through the classloader in case
// of Java EE (for e.g., WEB-INF/validation.xml)
ConfigurationImpl config = (ConfigurationImpl) Validation.byDefaultProvider().configure();
applyConfig(validationConfigType, config);
config.ignoreXmlConfiguration();
// Create the factory instance
ClassLoader oldContextLoader = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(classLoader);
factory = config.buildValidatorFactory();