Hi folks,

There's a slight change I want to make to the semantics of one of our
ObjectFactory methods that could just possibly break somebody; I want to
test the waters and see if anyone would actually be adversely affected.

Background:  There are two createObject methods in the ObjectFactory.  The
two-arg version--which we use, to my knowledge exclusively, internally, is
for passing in a "factoryId" and a fallback classname to use if all else
fails.    There is also a three-arg version, which additionally allows one
to specify the name of a properties file which will contain a mapping from
the factoryId to the name of the class to be instantiated.  The first
method calls the second with the properties filename set to null.

Historically, if you passed a real properties filename into this method,
Xerces would look for it in the $java.home/lib directory (where java.home
is the Java property mapping to the location of the running JVM).  I
managed to break this behaviour a while back by putting quotes around the
parameter name, so this semantics hasn't held for some while (at least 2
Xerces versions).  And no one's complained up to now.  :)

Obviously, that needs to be fixed.  What I'd like to do while fixing it
though is to *not* prepend $javahome/lib to this file name, thus allowing
it to be located anywhere on the user's system.  To my mind this is better
since the majority of Xerces installations lie outside of JDK's, and it
isn't hard in any event for people using this method to prepend
$java.home/lib themselves.

I'd also like to attempt to resolve to a default properties file if null is
passed in.  The reason for this is that there'll be some way then to have
our internal logic--which doesn't know anything about properties files--be
able to utilize properties files in a particular place.  It turns out that
there are situations in which it's very beneficial to be able to specify a
default configuration in just this manner.  I propose that
$java.home/lib/xerces.properties might be a good name for such a file.
This can, after all, always be overridden by setting the correct system
property, so this should not break anyone--and would seem to help some
people.

Anyone object?

Cheers,
Neil
Neil Graham
XML Parser Development
IBM Toronto Lab
Phone:  905-413-3519, T/L 969-3519
E-mail:  [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to