Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 89326 invoked from network); 23 Jan 2008 11:19:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Jan 2008 11:19:27 -0000 Received: (qmail 23015 invoked by uid 500); 23 Jan 2008 11:19:12 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 22953 invoked by uid 500); 23 Jan 2008 11:19:12 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 22940 invoked by uid 99); 23 Jan 2008 11:19:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Jan 2008 03:19:12 -0800 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: local policy) Received: from [80.77.214.52] (HELO mx2.lhsystems.com) (80.77.214.52) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Jan 2008 11:18:57 +0000 Received: from unknown (HELO SW-FRAUCM-CON04.ads.dlh.de) ([57.20.111.79]) by mx2.lhsystems.com with ESMTP; 23 Jan 2008 12:18:49 +0100 Received: from sw-fraucm-mbx05.ads.dlh.de ([57.20.111.170]) by SW-FRAUCM-CON04.ads.dlh.de with Microsoft SMTPSVC(6.0.3790.1830); Wed, 23 Jan 2008 12:18:50 +0100 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2992 Importance: normal Priority: normal Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: commons-configuration reload() how to do it? Date: Wed, 23 Jan 2008 12:18:48 +0100 Message-ID: <9535FE1B3D1C1442896A3132277C0B6A5B78D4@sw-fraucm-mbx05.ads.dlh.de> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: commons-configuration reload() how to do it? thread-index: AchdsbnfGc4bPdYySCeWD5pQQeF/tg== From: To: X-OriginalArrivalTime: 23 Jan 2008 11:18:50.0015 (UTC) FILETIME=[BA8852F0:01C85DB1] X-Virus-Checked: Checked by ClamAV on apache.org Hello, how is it possible to reload a configuration file without using a ReloadingStrategy (or, to be more precise: FileChangedReloadingStrategy or ManagedReloadingStrategy)? I found out the time consuming way that calling XMLConfiguration.reload() does nothing because it seems like that as default ReloadingStrategy the InvariantReloadingStrategy is used, which prevents reloading. So how can i reload if i don't want to do it automatically and don't want to trigger it via JMX? thanks in advance and regards, christian Migowski! P.S. reproducing this issue is easy: //first create a xml file (yourfile.xml): hi there code: XMLConfiguration config = new XMLConfiguration("yourfile.xml"); System.out.println("mycontent: "+config.getString("mycontent")); //now change your file Thread.sleep(10000); config.reload(); //and see, the changed file content isn't reloaded System.out.println("mycontent: "+config.getString("mycontent")); Sitz der Gesellschaft / Corporate Headquarters: Lufthansa Systems Infratec GmbH, Kelsterbach Registereintragung / Registration: Amtsgericht Darmstadt 83851 Vorsitzender des Aufsichtsrats / Chairman of the Supervisory Board: Dr. Gunter Kuechler Geschaeftsfuehrung / Management: Dr. Hannes Pfister --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org