Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 15949 invoked from network); 20 May 2005 06:50:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 May 2005 06:50:57 -0000 Received: (qmail 31561 invoked by uid 500); 20 May 2005 06:50:46 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 31500 invoked by uid 500); 20 May 2005 06:50:46 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 31485 invoked by uid 99); 20 May 2005 06:50:45 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FORGED_RCVD_HELO,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of christian.hufgard@gmx.de designates 213.165.64.20 as permitted sender) Received: from mail.gmx.de (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.28) with SMTP; Thu, 19 May 2005 23:50:43 -0700 Received: (qmail 11400 invoked by uid 0); 20 May 2005 06:50:36 -0000 Received: from 193.24.32.37 by www80.gmx.net with HTTP; Fri, 20 May 2005 08:50:36 +0200 (MEST) Date: Fri, 20 May 2005 08:50:36 +0200 (MEST) From: "Christian Hufgard" To: commons-user@jakarta.apache.org MIME-Version: 1.0 Subject: [Configuration] PropertiesConfiguration ReloadStrategy not working as expected X-Priority: 3 (Normal) X-Authenticated: #1277382 Message-ID: <17843.1116571836@www80.gmx.net> X-Mailer: WWW-Mail 1.6 (Global Message Exchange) X-Flags: 0001 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi everyone! Since yesterday I am a user of Configuration (1.1) - waited a long time for the release to replace the stuff I wrote for myself. I tried to replace my own properties handler with the one provided by Configuration. To to this, I created a PropertiesConfiguration the following way: PropertiesConfiguration propsConfig = new PropertiesConfiguration(propertiesFileName); reloading = new FileChangedReloadingStrategy(); propsConfig.setReloadingStrategy(reloading); propertiesFileName is the name of a properties-file that can be found in the shared/classes directory of my tomcat. Loading the properties from there worked fine. But the reloading did not work. So I took a look into the code and found out, that the FileChangedReloadingStrategy does not observe the right file. It was looking just for the filename without any basepath. When I instantiate the ReloadingStrategy with a complete path it works the way it should. Is this behaviour intended? Also I would like to diskuss some features, which I am misssing. First is the possibility to inform classes about a change at the properties, which I need for at leat one class, that has some cron-like job. I wrote a subclass of FileChangedReloadingStrategy that informs Listeners about changes at the properties. Would something like this be usefull for someone else? Think a periodically checking of the properties the way log4j does it, would also be nice to retrieve information independent to a user interacting with the system. Is this planned for Version 1.3? Task: observable configurations? The other is the possibility to use the ConfigurationFactory in combination with a ReloadingStrategy. I want to read the configuration details from a xml file with ConfigurationFactory factory = new ConfigurationFactory("config.xml"); Configuration config = factory.getConfiguration(); to have a flexibel way to change it, but do not want to loose the chance to get informed if the config changes. Is a feature like this planned for future releases? Greets Christian -- 5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail +++ GMX - die erste Adresse f�r Mail, Message, More +++ --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org