Return-Path: X-Original-To: apmail-felix-dev-archive@www.apache.org Delivered-To: apmail-felix-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 570359055 for ; Wed, 14 Mar 2012 21:53:03 +0000 (UTC) Received: (qmail 6108 invoked by uid 500); 14 Mar 2012 21:53:03 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 6068 invoked by uid 500); 14 Mar 2012 21:53:03 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 6058 invoked by uid 99); 14 Mar 2012 21:53:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2012 21:53:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2012 21:53:00 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id D04B520138 for ; Wed, 14 Mar 2012 21:52:39 +0000 (UTC) Date: Wed, 14 Mar 2012 21:52:39 +0000 (UTC) From: "Pieter (Commented) (JIRA)" To: dev@felix.apache.org Message-ID: <1250623705.15978.1331761959872.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1210905156.13714.1331744319450.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (FELIX-3395) Make preferences persistence location configurable MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/FELIX-3395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13229667#comment-13229667 ] Pieter commented on FELIX-3395: ------------------------------- Indeed, that's a better solution. Could this version be released? It would save some hassle to get a snapshot in my production environment. > Make preferences persistence location configurable > -------------------------------------------------- > > Key: FELIX-3395 > URL: https://issues.apache.org/jira/browse/FELIX-3395 > Project: Felix > Issue Type: Wish > Components: Preferences Service > Reporter: Pieter > > I want Preference Service to persist stored preferences and have them survive system restarts. Preference Service stores its stuff in the OSGi frameworks' cache region, which get cleared on restart (by Pax Runner, which is what I use). Trying to get around this was problematic, so I figured it would be nice to be able have the preferences database outside the cache directory. A system property like "felix.prefs.rootdir" could be used to set the location. > I patched the Preference Service from trunk to get this feature and the changes are minimal, I just added the following lines to the DataFileBackingStoreImpl constructor: > String configuredRootDir = System.getProperty("felix.prefs.rootdir"); > this.rootDirectory = configuredRootDir == null ? context.getDataFile("") : new File(configuredRootDir); > this.rootDirectory.mkdirs(); -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira