[hibernate-issues] [Hibernate-JIRA] Created: (BVAL-282) Make clear whether it's legal to invoke Configuration#buildValidatorFactory() several times

Gunnar Morling (JIRA) noreply at atlassian.com
Mon Mar 19 17:58:48 EDT 2012


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

                 Key: BVAL-282
                 URL: https://hibernate.onjira.com/browse/BVAL-282
             Project: Bean Validation
          Issue Type: Improvement
          Components: spec-general
    Affects Versions: 1.0 final
            Reporter: Gunnar Morling
             Fix For: 1.1


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:

{code}
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();
{code}

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

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list