RFC about making the gconf preference backend the default

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hopefully, today few fixes will be finally in the cvs, so the next
question is:

How to make this backend the default without breaking things?

There are 3 solution possibile, two of which are fine :

* To add a new defaultFactoryClass to the java.util.prefs.Preference

An attempt is made to load this class by name, if it fails then a
default backend (FileBased) is instantiated.
This approach adds a few lines of code that pollute a bit the
implementation, so it is just listed here, but I don't like it.

* To add a configuration property to gnu.classpath.Configuration

That is, if the gconf backend is not built, this property is not set at
all, so everything is just like always.
Right now this is what I would do.

* To add a property file to resources/META-INF.

This one makes sense as the preference api is not different by concept
from the sound api, and sound api configurations are there.
But there is a problem with it, as far as i understand it, this property
would be valid always, being the gconf backend built or not.

This means that each time a preference is instantiated, the first test
to see if the java.util.prefs.PreferencesFactory system property is
defined would throw an exception (the property is always defined) if the
gconf backend is not available.
It then reverts to the FileBased, but there is a small performance
impact here.

On system where the gconf backend is not used, maybe for performance
reasons, this may be annoying.

What do you think it would be the best? Mark, Tom?

Thanks,
Mario
-- 
Lima Software, SO.PR.IND. s.r.l.
http://www.limasoftware.net/
pgp key: http://subkeys.pgp.net/

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Questa =?ISO-8859-1?Q?=E8?= una parte del messaggio
	firmata digitalmente
Url : http://developer.classpath.org/pipermail/classpath/attachments/20060701/3779939d/attachment.pgp

[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux