admin@glassfish.java.net

Re: Preferences API

From: Lloyd Chambers <Lloyd.Chambers_at_Sun.COM>
Date: Fri, 15 Aug 2008 11:27:30 -0700

Ken,

First, what kind of preferences are being stored?

Is this for developer or production use?

My initial thought is that the user running Glassfish is problematic.
The user could be "root" or "_appserver" or "ken" or "lloyd". But the
user using the GUI is "admin" or "admin1", etc. So shouldn't
preferences be tied to the administrative user? It doesn't make sense
to me to associate them with the system user running the server.

Lloyd

On Aug 15, 2008, at 10:23 AM, Ken Paulsen wrote:

>
> Hi everyone,
>
> I wanted to float an idea and see what people think. Java provides
> a "Preferences API" (http://java.sun.com/j2se/1.5.0/docs/api/java/util/prefs/Preferences.html
> ). The default backing store for this api (on Linux anyway) stores
> the preference data in XML files in "~/.java/.userPrefs/*". This
> means if you use this API in GlassFish, the user running the GF
> process will get files put in their ~/.java/.userPrefs directory.
> If you move the application server or switch users which run GF,
> this preference data will be lost (unless you migrate the preference
> data also).
>
> I have 2 things I'd like feedback on:
>
> 1) Would it be acceptable for the GF Admin Console web application
> to use this API to store preferences knowing that it has the above
> limitations?
>
> 2) What do you think about adding a Java EE backing store that
> behaved more appropriately in a Java EE environment? This might be
> a nice developer-oriented feature to support in Java EE (or perhaps
> as a GlassFish value-add).
>
> Thanks,
>
> Ken
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>