Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 41825 invoked from network); 16 Sep 2009 13:23:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Sep 2009 13:23:21 -0000 Received: (qmail 70114 invoked by uid 500); 16 Sep 2009 13:23:19 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 70009 invoked by uid 500); 16 Sep 2009 13:23:19 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 69999 invoked by uid 99); 16 Sep 2009 13:23:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Sep 2009 13:23:19 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ralph.goers@dslextreme.com designates 209.85.220.226 as permitted sender) Received: from [209.85.220.226] (HELO mail-fx0-f226.google.com) (209.85.220.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Sep 2009 13:23:07 +0000 Received: by fxm26 with SMTP id 26so3683037fxm.42 for ; Wed, 16 Sep 2009 06:22:47 -0700 (PDT) Received: by 10.204.13.195 with SMTP id d3mr7397029bka.135.1253107367241; Wed, 16 Sep 2009 06:22:47 -0700 (PDT) Received: from ?192.168.10.132? (adsl-66-51-196-164.dslextreme.com [66.51.196.164]) by mx.google.com with ESMTPS id d13sm5569126fka.30.2009.09.16.06.22.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 16 Sep 2009 06:22:46 -0700 (PDT) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Mime-Version: 1.0 (Apple Message framework v1075.2) Subject: Re: [CONFIGURATION] Help with optional XML file in override section of configuration builder. From: Ralph Goers In-Reply-To: <99e30fe50909160437x4e6c455fodbdac0d16a8b881b@mail.gmail.com> Date: Wed, 16 Sep 2009 06:22:42 -0700 Content-Transfer-Encoding: 7bit Message-Id: References: <99e30fe50909140530v679e8cd9jfe7d744f02346f32@mail.gmail.com> <4AAE9B85.3040001@oliver-heger.de> <99e30fe50909150134t1843f2a1q6c80326ffff4709@mail.gmail.com> <4AAFE2CB.1000006@oliver-heger.de> <99e30fe50909160437x4e6c455fodbdac0d16a8b881b@mail.gmail.com> To: "Commons Users List" X-Mailer: Apple Mail (2.1075.2) X-Virus-Checked: Checked by ClamAV on apache.org On Sep 16, 2009, at 4:37 AM, Martin Ritchie wrote: > > Oliver, > Thanks for the pointer to use DefaultConfigurationBuilder. > > Whilst this now does not need to have the test.config property defined > or the file existing it does behave differently to the older > ConfigurationFactory. > > With the configuration as shown in the pastie > (http://pastie.org/617143) the ConfigurationFactory builds a single > configuration tree where later elements are overwritten by newer > values. > So given the configuration values shown here: http://pastie.org/618625 > The value of tests.store.class in config.xml (MemoryMessageStore) is > overwritten with (SlowMessageStore) from the test.config. The > additional values in the test.config are also propgated in to the > final configuraiton. > > When I changed to use the DefaultConfigurationBuilder the entire > virtualhosts section was overwritten as a result the other virtualhost > sections in config.xml were lost. > > Is there a way I can get the behaviour as seen with the > ConfigurationFactory but have the file parsing/loading of the > DefaultConfigurationBuilder? > What you are experiencing is probably a result of the NodeCombiner being used. In trunk you will find a "MergeCombiner" that may behave the way you want it to. If you build trunk you should look at the updated documentation as it provides some documentation on how the 3 combiners work and what results they will produce in various situations. Ralph --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org