You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Jarek Gawor (JIRA)" <ji...@apache.org> on 2013/02/05 18:06:11 UTC

[jira] [Resolved] (GERONIMO-6393) javax.validation.Validator lookup improvement

     [ https://issues.apache.org/jira/browse/GERONIMO-6393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jarek Gawor resolved GERONIMO-6393.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0.1

Forgot to close.

                
> 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.0
>            Reporter: Jarek Gawor
>            Assignee: Jarek Gawor
>             Fix For: 3.0.1
>
>
> 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