Mario Torre wrote:
> This patch makes gconf the default backend.
> 
> The patch works adding a new configure option that let the user to
> specify a default implementation (like FileBased or GConfBased ones).
> 
> If the user does not provides this option, than the preference backend
> is FileBased (current default).
> 
> Only if the GConf backend is built, than it is used, unless the flag
> specify a different default.
> 
> To make this possible, I have added a new field to
> gnu.classpath.Configuration.in, this is inherited from the 
> configure.ac.

We're trying to move away from gnu.classpath.Configuration, so this is
not ideal.

Also, why are you doing this:

+        System.setProperty("java.util.prefs.PreferencesFactory",
+                           Configuration.DEFAULT_PREFS_PEER);

in java.util.prefs.Preferences?

I would expect that to be in gnu.classpath.SystemProperties, because
this way there is no point to having a system property (as it gets
overwritten anyway).

How about simply changing the default factory in
Preferences.getFactory() to try GConf first and if it doesn't exist fall
back to the file based implementation? Your objection that this is
inefficient because of the exception doesn't really hold water, as this
is only done once (the cached factory is used on subsequent calls).

Regards,
Jeroen

Reply via email to