Jarek Gawor created GERONIMO-6393:
-------------------------------------

             Summary: javax.validation.Validator lookup improvement
                 Key: GERONIMO-6393
                 URL: https://issues.apache.org/jira/browse/GERONIMO-6393
             Project: Geronimo
          Issue Type: Improvement
      Security Level: public (Regular issues)
          Components: general
    Affects Versions: 3.0
            Reporter: Jarek Gawor
            Assignee: Jarek Gawor


Each time the same application looks up javax.validation.Validator object in 
JNDI a completely new instance of the object is returned (as required per 
spec). However, with Apache Bean Validation implementation that means that 
expensive annotation scanning is done on each Validator.validate() call.

Apache Bean Validation implementation maintains an annotation cache with each 
ValidatorContext. However, each ValidatorFactory.getValidator() call creates a 
new instance of ValidatorContext and that's why the cache is not reused and 
annotation scanning is done on each call. In Geronimo we can ensure that the 
same ValidatorContext is used for the given application and therefore, ensure 
that cache is reused and annotation scanning is only done one.



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to