private void ensureFactoryValidator ( ClassLoader appCl ) { config . addProperty ( "bval.before.cdi" , "true" ) ; factory = BeanValidationExtensionHelper . validatorFactoryAccessorProxy ( appCl ) ; if ( appCl . toString ( ) . contains ( "com.ibm.ws.classloading.internal.AppClassLoader@" ) ) { instance ( ) . factory = factory ; } validator = factory . getValidator ( ) ; }
lazily to get a small luck to have CDI in place