Does anyone know of a good tutorial (or any tutorial) or any GPL code
that I can look at to show me how to do my own Factory ???
Ta
Jaj
>Yeah that's what I thought. I think that I will have to implement my
>own version of the PreferenceFactory and the AbstractPreferences.
Since you are tossing Sun's preference mechanism aside, you could just
do this with a class with a static get and save method where you
specify the full node name on each get/save.
Another thought is JDK 1.5 Preferences has an xml import/export built
in.
If you want to replace the official preferences here is what to do:
Write yourself a JAIPreferences class that extends the abstract
Preferences class.
Then write a class that implements the PreferencesFactory interface.
basically all it does is return new JAIPreferences().
If the system property java.util.prefs.PreferencesFactory is defined,
then it is taken to be the fully-qualified name of a class
implementing the PreferencesFactory interface.
there is another method of registering your factory with a magic jar
entry described under Preferences.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
jaj_developer@yahoo.co.uk - 29 Sep 2005 10:53 GMT
Roedy,
Thanks for your wise words....
Have implemented a system based upon the info above
Ta
Jaj