[bv-dev] BVAL-263 ValidatorFactory.close()

Emmanuel Bernard emmanuel at hibernate.org
Mon Feb 6 10:48:06 EST 2012


I wonder about that. Surely the system caching or reusing it know about the state. Take the example of the EE container or the dependency injection framework. It knows when the application is started as well as destroyed and can tie the VF life cycle to this event. Remember the VF configuration is per app specific via the META-INF/validation.xml file, it's not like someone is likely reusing the same VF across several apps (it could lead to classloader leaks).

On 6 févr. 2012, at 16:20, Jagadish Prasath Ramu wrote:

> As per the java-doc, ValidatorFactory can be cached or re-used. In such
> cases, isClosed() will be useful.
> 
> Thanks,
> -Jagadish
> 
> On Mon, 2012-02-06 at 10:50 +0100, Emmanuel Bernard wrote:
>> To support dependency injection, we need a close event at the ValidatorFactory level to properly release managed beans. I can imagine other resources could benefit from this close operation as well.
>> 
>> I'm working toward adding it to the spec but I am wondering whether or not we need a companion isClosed() method to the ValidatorFactory. Do you see situations where you would need this information (as container developer, framework developer or mere user of Bean Validation)?
>> 
>> Emmanuel
>> _______________________________________________
>> beanvalidation-dev mailing list
>> beanvalidation-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
> 
> 
> _______________________________________________
> beanvalidation-dev mailing list
> beanvalidation-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev




More information about the beanvalidation-dev mailing list