felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pieter (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-3395) Make preferences persistence location configurable
Date Wed, 14 Mar 2012 18:48:41 GMT

    [ https://issues.apache.org/jira/browse/FELIX-3395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13229493#comment-13229493
] 

Pieter commented on FELIX-3395:
-------------------------------

I might agree with you last remark. I like Pax Runner as a way to provision using a Maven
repository, but dumping the cache is not an elegant thing to do. I'll see which solution I
can find in that area, but that's another issue. Still I would love to have this feature,
because it solves (works around) my problem. As a final argument to sell it I would say it
offers more freedom. For people who don't use it, it doesn't harm. But maybe there are more
people like me, who for some reason would like to persist this data on a specific location.
                
> 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

        

Mime
View raw message