helperClass = (Class) AccessController.doPrivileged(
new PrivilegedClassForName(helperClassName, true, eclipseLinkClassLoader));
} else {
helperClass = PrivilegedAccessHelper.getClassForName(helperClassName, true, eclipseLinkClassLoader);
}
BeanValidationInitializationHelper beanValidationInitializationHelper = (BeanValidationInitializationHelper)helperClass.newInstance();
beanValidationInitializationHelper.bootstrapBeanValidation(puProperties, session, processor.getProject(), appClassLoader);
} catch (Throwable e) { //Catching Throwable to catch any linkage errors on vms that resolve eagerly
if (validationMode == ValidationMode.CALLBACK) {
throw PersistenceUnitLoadingException.exceptionObtainingRequiredBeanValidatorFactory(e);
} // else validationMode == ValidationMode.AUTO. Log a message, Ignore the exception
// TODO use proper message string, i18n.