Uploaded image for project: 'Bean Validation'
  1. BVAL-282

Make clear whether it's legal to invoke Configuration#buildValidatorFactory() several times

    Details

    • Last commented by a user?:
      true

      Description

      It's currently not clearly specified, whether buildValidatorFactory() may be invoked several times on a given Configuration instance. A use case for this might be to create several factories which only slightly differ in their configuration:

      Configuration<?> configuration = Validation.byDefaultProvider().configure();
      
      //set up interpolator, traversable resolver etc.
      configuration. ...();
      
      ValidatorFactory vf1 = configuration.buildValidatorFactory();
      
      //further customize configuration for another factory
      configuration. ...();
      
      ValidatorFactory vf2 = configuration.buildValidatorFactory();
      

      We should explicitly mention whether that's allowed or not.

      Related discussion on the mailing list: http://lists.jboss.org/pipermail/beanvalidation-dev/2012-March/000290.html
      Related post in HV forum: https://forum.hibernate.org/viewtopic.php?f=9&t=1014788

        Attachments

          Issue links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: