Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@www.apache.org Received: (qmail 2664 invoked from network); 17 Oct 2003 16:45:03 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 17 Oct 2003 16:45:03 -0000 Received: (qmail 39613 invoked by uid 500); 17 Oct 2003 16:44:50 -0000 Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 39568 invoked by uid 500); 17 Oct 2003 16:44:50 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 39552 invoked from network); 17 Oct 2003 16:44:50 -0000 Received: from unknown (HELO smtp.easystreet.com) (206.26.36.40) by daedalus.apache.org with SMTP; 17 Oct 2003 16:44:50 -0000 Received: from apache.org (dsl-208-161-106-6.dsl.easystreet.com [208.161.106.6]) by smtp.easystreet.com (Postfix) with ESMTP id 7E78084538D for ; Fri, 17 Oct 2003 09:44:53 -0700 (PDT) Message-ID: <3F901C79.4050001@apache.org> Date: Fri, 17 Oct 2003 09:44:41 -0700 From: "Craig R. McClanahan" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tomcat Developers List Subject: Re: [5.0] Property replacement References: <20031017141533.24643.qmail@nagoya.betaversion.org> <3F900538.7030108@apache.org> In-Reply-To: <3F900538.7030108@apache.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Remy Maucherat wrote: > Hi, > > I'd like to make a small proposal to do property replacement. Included > are changes that should be made in the digester, and that I'll post on > commons-dev if I have approval. > > - Add a get/setProperty to Container. This would allow a property > inheritance across containers, similar to Tomcat 3.3 features as > described by Bill. > > - Add the two introspectionUtil replaceProperties methods to the > digester, along with a way to set the array of PropertySource globally > for a digester instance. The replaceProperties will be called > automagically if the standard set properties rule is added to an > element, and will check all attributes for possible property replacement. This sounds like a good addition to Digester. I would prefer to also have replacement enabled by a boolean property on the Digester instance (default=false), so that we don't mess up people using Digester to parse things that happen to have "${ ... }" in the attribute values or element bodies. > > - Additionally, we could add the "set all properties" rule to > digester, which would attempt to call a setProperty method on an > object to set properties which have no designated setter. I'm mixed on > this: we need something like that for the Connector, but this is a > very specific situation, and may be abused in the general case. I'm dubious on this one as well, but will look at the details of what you'd propose. > > - Note: The properties used will not be saved when using save-to-XML > from the admin. If anyone has an idea on how to make it work, let me > know ;-) (anyway, save-to-XML should probably be rewritten in a non > hackish and flexible fashion, but this can wait) Agree that this code is about as hackish as you can get, but at least it sorta worked :-). > > Comments ? > > Remy Craig --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org