Just triggered another round of full-profile tck to evaluate the impact. On Thu, Aug 18, 2011 at 3:12 AM, <[email protected]> wrote:
> Author: kevan > Date: Wed Aug 17 19:12:30 2011 > New Revision: 1158874 > > URL: http://svn.apache.org/viewvc?rev=1158874&view=rev > Log: > GERONIMO-6055 This change limits the ClassLoader searching (getWiredBundle, > etc) that will occur during BeanValidation application startup. > ValidatorFactory creation time becomes nearly zero. Bean Validation TCK > tests passed for me. Would like some validation of this. Will also need to > keep an eye out for any potential side effects. There may be better ways of > doing this. So, alternatives welcome. > > Modified: > > > geronimo/server/trunk/plugins/bval/geronimo-bval/src/main/java/org/apache/geronimo/bval/ValidatorFactoryGBean.java > > Modified: > geronimo/server/trunk/plugins/bval/geronimo-bval/src/main/java/org/apache/geronimo/bval/ValidatorFactoryGBean.java > URL: > http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/bval/geronimo-bval/src/main/java/org/apache/geronimo/bval/ValidatorFactoryGBean.java?rev=1158874&r1=1158873&r2=1158874&view=diff > > ============================================================================== > --- > geronimo/server/trunk/plugins/bval/geronimo-bval/src/main/java/org/apache/geronimo/bval/ValidatorFactoryGBean.java > (original) > +++ > geronimo/server/trunk/plugins/bval/geronimo-bval/src/main/java/org/apache/geronimo/bval/ValidatorFactoryGBean.java > Wed Aug 17 19:12:30 2011 > @@ -207,7 +207,7 @@ public class ValidatorFactoryGBean imple > ClassLoader oldContextLoader = > Thread.currentThread().getContextClassLoader(); > // No validation configuration specified. Create default instance. > try { > - Thread.currentThread().setContextClassLoader(classLoader); > + Thread.currentThread().setContextClassLoader(null); > factory = Validation.buildDefaultValidatorFactory(); > } finally { > Thread.currentThread().setContextClassLoader(oldContextLoader); > > > -- Shawn
