Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 60136 invoked from network); 25 Sep 2006 07:25:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Sep 2006 07:25:40 -0000 Received: (qmail 94514 invoked by uid 500); 25 Sep 2006 07:25:38 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 94258 invoked by uid 500); 25 Sep 2006 07:25:37 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 94247 invoked by uid 99); 25 Sep 2006 07:25:37 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Sep 2006 00:25:37 -0700 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received: from [209.237.227.198] ([209.237.227.198:42946] helo=brutus.apache.org) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 32/EB-13750-07487154 for ; Mon, 25 Sep 2006 00:25:36 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 325AD7142A1 for ; Mon, 25 Sep 2006 07:21:51 +0000 (GMT) Message-ID: <8222703.1159168911202.JavaMail.jira@brutus> Date: Mon, 25 Sep 2006 00:21:51 -0700 (PDT) From: "Janusz Studzizba (JIRA)" To: commons-dev@jakarta.apache.org Subject: [jira] Commented: (CONFIGURATION-228) XMLConfiguration.subset() with FileChangedReloadingStrategy does *not* 'see' file changes In-Reply-To: <8747787.1158924982579.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/CONFIGURATION-228?page=comments#action_12437475 ] Janusz Studzizba commented on CONFIGURATION-228: ------------------------------------------------ Olivier, IMHO it is not a "life" subset link to parent configuration. issue. See my code line designated with [AA]: Configuration parentItemConfig = config.subset("parent-item"); //[AA] I am creating *new* subset from parent configuration, parent config is realoded, while newly created subset from such reloaded refreshed parent returns old values.. I looked into source code, and IMHO realod() method should be called in somewhere in subset() implementation as it is called in eg. AbstractFileConfiguration.getProperty() > XMLConfiguration.subset() with FileChangedReloadingStrategy does *not* 'see' file changes > ----------------------------------------------------------------------------------------- > > Key: CONFIGURATION-228 > URL: http://issues.apache.org/jira/browse/CONFIGURATION-228 > Project: Commons Configuration > Issue Type: Bug > Affects Versions: 1.2 Final > Reporter: Janusz Studzizba > > XMLConfiguration.subset() with FileChangedReloadingStrategy does *not* 'see' file changes > Configuration.xml: > > > old_value > > > 1. XMLConfiguration is loaded: > config = new XMLConfiguration("c:\\conf.xml"); > config.setReloadingStrategy(new FileChangedReloadingStrategy()); > 2. Now, node value changes to "new_value", > and the code: > Configuration parentItemConfig = config.subset("parent-item"); [AA] > String ss2 = parentItemConfig.getString("sub-item"); > returns "old_value" !!! > while: config.getString("parent-item.sub-item"); returns new refreshed value. > It is a bug, we have FileChangedReloadingStrategy, we create new subset in [AA] but receive old values. > [for now, workaround for config users is to call config.reload() when strategy.hasChanged()] -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org