2007/3/19, Alexey Petrenko <[EMAIL PROTECTED]>:
In fact Evgenia has rised this question on dev list a month ago while
preparing the patch :)

Regarding default properties I agree that we need a way to set default
classlib properties in classlib. On of the main reasons for this
approach that Harmony has more VMs then classlibs :)

As a solution I would suggest a DefaultProperties (or smth like that)
class in java.lang or org.apache.harmony.smth package to incorporate
all the default properties for classlib.

Java code look inappropriate for properties initialization due to
several reasons:
1) The default values must be truly default - i.e. be restored in case
system properties are reset, be available at startup, etc. This
implies using native VMI.
2) Values may be platform dependent (as FilePreferencesFactoryImpl),
this is better addressed in native.

Do we really need separate properties for each module?
If this helps to reduce semantic & build dependencies, it worths separation.
Yet the properties in question better fit to luni startup, as neither
xml nor prefs have startup initialization.


SY, Alexey

2007/3/19, Alexey Varlamov <[EMAIL PROTECTED]>:
> I think we should minimize hardcoding classlib specific values to VMs,
> and suggest to reconsider the way this issue is fixed.
> IMO setting the defaults like
> "java.util.prefs.FilePreferencesFactoryImpl" or
> "javax.xml.transform.TransformerFactory" should be done during
> initialization of respective classlib modules, or, if this is
> impossible/inappropriate, added to luni's initialization rather than
> to VM startup.
> Actually there is a bunch of corresponding FIXME comments in the
> modified DRLVM source - let's fix them instead of aggravating.
> Should I reopen the JIRA?
>
> --
> Alexey
>
> 2007/3/17, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> > Author: apetrenko
> > Date: Sat Mar 17 01:58:05 2007
> > New Revision: 519267
> >
> > URL: http://svn.apache.org/viewvc?view=rev&rev=519267
> > Log:
> > Patch for HARMONY-3209 "Harmony's default instance of 
javax.xml.TransformerFactory differs from RI's one"
> >
> > Modified:
> >    harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_properties.cpp
> >
> > Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_properties.cpp
> > URL: 
http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_properties.cpp?view=diff&rev=519267&r1=519266&r2=519267
> > 
==============================================================================
> > --- harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_properties.cpp 
(original)
> > +++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_properties.cpp Sat 
Mar 17 01:58:05 2007
> > @@ -209,6 +209,10 @@
> >  #else
> >         "java.util.prefs.FilePreferencesFactoryImpl");
> >  #endif
> > +    // Property for xalan.jar
> > +    properties.set("javax.xml.transform.TransformerFactory",
> > +                   "org.apache.xalan.xsltc.trax.TransformerFactoryImpl");
> > +
> >
> >     // Added for compatibility with the external java JDWP agent
> >     properties.set("sun.boot.library.path", base_path_buf);
> >
> >
> >
>

Reply via email to