code: private void obtainValidator()
      {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
  
          if (fromValidatorFactory)
          {
              if (isTraceOn && tc.isDebugEnabled())
              {
                  Tr.debug(tc, "Obtaining Validator instance from ValidatorFactory...");
              }
  
              ValidatorFactory validatorFactory = ivValidatorFactoryLocator.getValidatorFactory();
              ivValidator = validatorFactory.getValidator();
          }
          else
          {
              if (isTraceOn && tc.isDebugEnabled())
              {
                  Tr.debug(tc, "Obtaining Validator instance from ValidatorContext, using TraversableResolver " + ivSpecifiedTraversableResolver +
                               ", message interpolator " + ivSpecifiedMessageInterpolator +
                               ", parameter name provider " + ivSpecifiedParameterNameProvider
                               + ", and constraint validator factory " + ivSpecifiedConstraintValidatorFactory);
              }
  
              ValidatorFactory validatorFactory = ivValidatorFactoryLocator.getValidatorFactory();
              ValidatorContext validatorContext = validatorFactory.usingContext();
  
              if (ivSpecifiedTraversableResolver != null)
              {
                  validatorContext.traversableResolver(ivSpecifiedTraversableResolver);
              }
  
              if (ivSpecifiedMessageInterpolator != null)
              {
                  validatorContext.messageInterpolator(ivSpecifiedMessageInterpolator);
              }
  
              if (ivSpecifiedConstraintValidatorFactory != null)
              {
                  validatorContext.constraintValidatorFactory(ivSpecifiedConstraintValidatorFactory);
              }
  
              if (ivSpecifiedParameterNameProvider != null)
                  validatorContext.parameterNameProvider(ivSpecifiedParameterNameProvider);
  
              ivValidator = validatorContext.getValidator();
          }
  
          if (isTraceOn && tc.isDebugEnabled())
          {
              Tr.debug(tc, "Obtained the Validator: " + ivValidator);
          }
  
      }
docs: Obtains the underlying javax.validation.Validator instance that is used by
  this wrapper.
  
  The underlying javax.validation.Validator instance is obtained in one of
  two ways.
  
  If this JPAValidatorWrapper was obtained from the JPAValidatorFactory,
  then the Validator instance is obtained from the ValidatorFactory instance.
  
  On the other hand, if this JPAValidatorWrapper was obtained from the
  JPAValidatorContextWrapper, then the Validator instance is obtained from the
  ValidatorContext, and the specified TraversableResolver, MessageInterpolator,
  and ConstraintValidatorFactory instances are used as part of this process.