Return-Path: X-Original-To: apmail-geronimo-dev-archive@www.apache.org Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C24938776 for ; Thu, 18 Aug 2011 15:28:57 +0000 (UTC) Received: (qmail 85173 invoked by uid 500); 18 Aug 2011 15:28:57 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 85087 invoked by uid 500); 18 Aug 2011 15:28:56 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 85080 invoked by uid 99); 18 Aug 2011 15:28:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Aug 2011 15:28:56 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of genspring@gmail.com designates 209.85.215.54 as permitted sender) Received: from [209.85.215.54] (HELO mail-ew0-f54.google.com) (209.85.215.54) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Aug 2011 15:28:48 +0000 Received: by ewy1 with SMTP id 1so1161224ewy.13 for ; Thu, 18 Aug 2011 08:28:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=x0GAc8x6jhxO8NwD2Gyfibjd0UFsoKTo+979gwAC+Qw=; b=NF96QvfNMM3AGUv+NoTcfIwjH0UcHg+9Q9Rd5Zs5M1cyvOTs8BFNGoQEO540hufyOt 8m1hj1IRfB12d57mfXX2E30lwaHzpkMOI5lem7FLgCMaUWo79DUG3Moe+JsE3ZU7Cj1t 5scYcQKOlUB3mJVKYJNHH8G46DNUplQItPgAs= MIME-Version: 1.0 Received: by 10.213.17.148 with SMTP id s20mr277326eba.122.1313681308307; Thu, 18 Aug 2011 08:28:28 -0700 (PDT) Received: by 10.213.8.147 with HTTP; Thu, 18 Aug 2011 08:28:28 -0700 (PDT) In-Reply-To: <20110817191230.79D912388A6C@eris.apache.org> References: <20110817191230.79D912388A6C@eris.apache.org> Date: Thu, 18 Aug 2011 23:28:28 +0800 Message-ID: Subject: Re: svn commit: r1158874 - /geronimo/server/trunk/plugins/bval/geronimo-bval/src/main/java/org/apache/geronimo/bval/ValidatorFactoryGBean.java From: Shawn Jiang To: dev@geronimo.apache.org Content-Type: multipart/alternative; boundary=0015174be274bad2d604aac9439f X-Virus-Checked: Checked by ClamAV on apache.org --0015174be274bad2d604aac9439f Content-Type: text/plain; charset=ISO-8859-1 Just triggered another round of full-profile tck to evaluate the impact. On Thu, Aug 18, 2011 at 3:12 AM, 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 --0015174be274bad2d604aac9439f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Just triggered another round of full-profile tck to evaluate the impact.
On Thu, Aug 18, 2011 at 3:12 AM, <kevan@apache.org> wrote:
Author: kevan
Date: Wed Aug 17 19:12:30 2011
New Revision: 1158874

URL: http://svn.apache.org/viewvc?rev=3D1158874&view=3Drev=
Log:
GERONIMO-6055 This change limits the ClassLoader searching (getWiredBundle,= etc) that will occur during BeanValidation application startup. ValidatorF= actory 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 o= ut for any potential side effects. There may be better ways of doing this. = So, alternatives welcome.

Modified:
=A0 =A0geronimo/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/or= g/apache/geronimo/bval/ValidatorFactoryGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugin= s/bval/geronimo-bval/src/main/java/org/apache/geronimo/bval/ValidatorFactor= yGBean.java?rev=3D1158874&r1=3D1158873&r2=3D1158874&view=3Ddiff=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D
--- geronimo/server/trunk/plugins/bval/geronimo-bval/src/main/java/org/apac= he/geronimo/bval/ValidatorFactoryGBean.java (original)
+++ geronimo/server/trunk/plugins/bval/geronimo-bval/src/main/java/org/apac= he/geronimo/bval/ValidatorFactoryGBean.java Wed Aug 17 19:12:30 2011
@@ -207,7 +207,7 @@ public class ValidatorFactoryGBean imple
=A0 =A0 =A0 =A0 ClassLoader oldContextLoader =3D Thread.currentThread().ge= tContextClassLoader();
=A0 =A0 =A0 =A0 // No validation configuration specified. Create default i= nstance.
=A0 =A0 =A0 =A0 try {
- =A0 =A0 =A0 =A0 =A0 =A0Thread.currentThread().setContextClassLoader(class= Loader);
+ =A0 =A0 =A0 =A0 =A0 =A0Thread.currentThread().setContextClassLoader(null)= ;
=A0 =A0 =A0 =A0 =A0 =A0 factory =3D Validation.buildDefaultValidatorFactor= y();
=A0 =A0 =A0 =A0 } finally {
=A0 =A0 =A0 =A0 =A0 =A0 Thread.currentThread().setContextClassLoader(oldCo= ntextLoader);





--
Shawn
--0015174be274bad2d604aac9439f--