Return-Path: Delivered-To: apmail-incubator-cxf-dev-archive@locus.apache.org Received: (qmail 98452 invoked from network); 14 Mar 2008 00:11:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Mar 2008 00:11:07 -0000 Received: (qmail 70765 invoked by uid 500); 14 Mar 2008 00:11:04 -0000 Delivered-To: apmail-incubator-cxf-dev-archive@incubator.apache.org Received: (qmail 70712 invoked by uid 500); 14 Mar 2008 00:11:04 -0000 Mailing-List: contact cxf-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-dev@incubator.apache.org Delivered-To: mailing list cxf-dev@incubator.apache.org Received: (qmail 70698 invoked by uid 99); 14 Mar 2008 00:11:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Mar 2008 17:11:04 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [64.79.199.57] (HELO server.dankulp.com) (64.79.199.57) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Mar 2008 00:10:13 +0000 Received: by server.dankulp.com (Postfix, from userid 5000) id 3DB69197C21E; Thu, 13 Mar 2008 20:10:32 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on server.dankulp.com X-Spam-Level: X-Msg-File: /tmp/mailfilter.XXXX7SFnpD Received: from dilbert (c-24-147-10-180.hsd1.ma.comcast.net [24.147.10.180]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server.dankulp.com (Postfix) with ESMTP id 3FAFC197C21C; Thu, 13 Mar 2008 20:10:28 -0400 (EDT) From: Daniel Kulp To: cxf-dev@incubator.apache.org Subject: Re: [PLEASE [DISCUSS]] Spring validation Date: Thu, 13 Mar 2008 20:10:25 -0400 User-Agent: KMail/1.9.7 Cc: Dan Diephouse References: <61b5d9410803130054h42dbd726s716c2a5844691f8f@mail.gmail.com> <61b5d9410803130421t49476480m157bf0c5889aaf3c@mail.gmail.com> <47D9B0D7.9030000@mulesource.com> In-Reply-To: <47D9B0D7.9030000@mulesource.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803132010.26134.dkulp@apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=0.4 required=3.0 tests=BAYES_00,RCVD_IN_PBL, RCVD_IN_SORBS_DUL,RDNS_DYNAMIC,TW_CX autolearn=no version=3.2.4 On Thursday 13 March 2008, Dan Diephouse wrote: > Have you tried creating multiple ApplicationContexts? i.e. create the > first application context which is not validated with all the CXF > files. Then create another with all the user files which has the first > context as the parent. That has OTHER issues as well. The BeanPostProcessors that we register to do various things (like determine extenstions, Resource injection, JSR250 processing, etc...) only work on the context they are created in, not the child contexts. I was battling that on tuesday and haven't figured out a solution yet. In the Servlet, we create a child context for the cxf-servlet.xml, and beans defined in there don't get resources injected properly. Kind of sucks. Also, during the BeanDefinitionParser parsing, the parent context beans are NOT available in the parser context. Thus, if you try and lookup the "cxf" Bus object, you won't find it. If you have a solution to those issues, I'd LOVE to see it. Dan > > Dan > > Benson Margulies wrote: > > One more note for now: it's harder than I had hoped to be selective > > about validation, due to the modularity of Spring. I haven't given > > up yet. > > > > On Thu, Mar 13, 2008 at 7:09 AM, Benson Margulies > > > > > > wrote: > >> The validation in question is of spring configuration files. It > >> occurs, first and foremost, as part of Bus initialization on both > >> server and client. It's the user's cxf.xml plus all the included > >> files, and/or the invisible process of loading a series of Spring > >> XML files to set up the default bus. The identifier > >> spring.validation.mode was apparently invented by us, at least as > >> far as a quick google would indicate. > >> > >> From my point of view, it takes CXF a surprisingly long time to > >> start up, and so moving all validation from on by default to off by > >> default appeals to me. Documentation would seem to be an important > >> aspect. > >> > >> However, if no one disagrees with your preference to leave > >> validation in general on by default but turn it off for our > >> internal files, then I'll very cheerfully do that. > >> > >> > >> > >> > >> On Thu, Mar 13, 2008 at 5:48 AM, Glen Mazza > >> > >> > >> wrote: > >>> I don't know the full story here--is this validation occurring for > >>> web services or SOAP clients--which one is your main concern? > >>> Also, is this validation occurring for *every* web service request > >>> (client side) or *each* web service processing (service side)--or > >>> just once? Also, which config files are you speaking of--just the > >>> main cxf.xml one used for the bus? > >>> > >>> I suspect we do not need to be validating our own static > >>> configuration files (if any), but validating their config files > >>> would appear to make sense--this is something they can turn off if > >>> it performance is a problem for them. For newbies, I think is is > >>> better to have validation over performance, even if it is not > >>> immediately obvious to the newbie how to optimize performance. > >>> > >>> Also, is this "spring.validation.mode" property a Spring default > >>> name (i.e., those working with Spring usually know about it)? > >>> Then perhaps it would be best to keep using that property name. > >>> Just as the benefits of working with Maven is that all projects > >>> run alike, a similar argument can be made for configuring > >>> Spring-based applications. > >>> > >>> Regards, > >>> Glen > >>> > >>> Am Donnerstag, den 13.03.2008, 03:54 -0400 schrieb Benson Margulies: > >>>> This message is an outgrowth of my performance investigations. > >>>> > >>>> We are (still?) validating spring XML files by default, at high > >>>> cost. > >>>> > >>>> We control validation with a system property with a name that > >>>> doesn't > >>> > >>> say > >>> > >>>> 'cxf' in it anywhere. > >>>> > >>>> I could submit the following change: > >>>> > >>>> 1) Add the name org.apache.cxf.spring.validation.mode as a > >>> > >>> (compatible) > >>> > >>>> replacement for spring.validation.mode. > >>>> > >>>> 2) Treat the default as 'none'. > >>>> > >>>> Or, I could make the BusApplicationContext force validation off > >>>> when > >>> > >>> reading > >>> > >>>> any file with a pathname beginning with META-INF:/cxf (e.g., one > >>>> of > >>> > >>> ours), > >>> > >>>> so that users still get validation by default. > >>>> > >>>> Please send along thoughts. -- J. Daniel Kulp Principal Engineer, IONA dkulp@apache.org http://www.dankulp.com/blog