Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.help > #2096
| From | "John B. Matthews" <nospam@nospam.invalid> |
|---|---|
| Newsgroups | comp.lang.java.help |
| Subject | Re: Database implementation of java.util.prefs.Preferences? |
| Date | 2012-09-19 20:59 -0400 |
| Organization | The Wasteland |
| Message-ID | <nospam-A9311B.20595019092012@news.aioe.org> (permalink) |
| References | <505a3037$0$1299$65785112@news.neostrada.pl> <k3dgu8$k1h$1@dont-email.me> |
In article <k3dgu8$k1h$1@dont-email.me>, markspace <-@.> wrote: > On 9/19/2012 1:51 PM, Marcin wrote: > > > > I have a Java program that uses java.util.prefs.Preferences to > > store configuration data. Everything is OK if one user works on one > > computer but if one user can use many computers the data is not > > shared between workstations and "environment" is different > > dependent on which computer user is logged in. I think I can store > > the same data in database because application uses connection to > > database for other purposes. Do you know any implementation of > > abstract class java.util.prefs.Preferences that uses SQL to store > > the configuration data? I cannot google anything > > > I would kind of doubt there is one. In a situation like this, I > would consider using Preferences::exportSubtree() and > Preferences::importPreferences() to read and write to a blob in a > database. > > I'd think carefully about it first though, as something about it > feels like a mismatch for a preferences module in general. "There are two separate trees of preference nodes, one for user preferences and one for system preferences." Instead of SQL, just start from systemRoot() for shared preferences. <http://docs.oracle.com/javase/7/docs/api/java/util/prefs/Preferences.html> -- John B. Matthews trashgod at gmail dot com <http://sites.google.com/site/drjohnbmatthews>
Back to comp.lang.java.help | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Database implementation of java.util.prefs.Preferences? Marcin <nomail@nospam.com> - 2012-09-19 22:51 +0200
Re: Database implementation of java.util.prefs.Preferences? markspace <-@.> - 2012-09-19 15:28 -0700
Re: Database implementation of java.util.prefs.Preferences? "John B. Matthews" <nospam@nospam.invalid> - 2012-09-19 20:59 -0400
Re: Database implementation of java.util.prefs.Preferences? markspace <-@.> - 2012-09-19 19:07 -0700
Re: Database implementation of java.util.prefs.Preferences? "John B. Matthews" <nospam@nospam.invalid> - 2012-09-20 12:20 -0400
Re: Database implementation of java.util.prefs.Preferences? Roedy Green <see_website@mindprod.com.invalid> - 2012-09-21 07:12 -0700
Re: Database implementation of java.util.prefs.Preferences? "John B. Matthews" <nospam@nospam.invalid> - 2012-09-21 21:10 -0400
Re: Database implementation of java.util.prefs.Preferences? Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-09-21 10:19 -0700
csiph-web