[moved at last from [EMAIL PROTECTED] :) ]

Myriam,

two important things happened to me today :)

1) I got new Gary's message from [EMAIL PROTECTED] and re-read
Joe's comments of 2002-06-04 regarding context class loaders and
compatibility issues;
2) I had a look at the new version of org.apache.xalan.serialize.Encodings
you've submitted to the CVS.

So I got two new questions:
1) What is your opinion, maybe we need to retain the fragment dealing with
ordinary class-specific class loader in order to have 1.1.8 compatibility?
Just before calling ClassLoader.getSystemResource() as the last resort...
Something like this:

// ... dealing with context class loader, reflection, etc. ...
// ...
      if (url == null) {
        ClassLoader cl = Encodings.class.getClassLoader();
        if (cl != null) {
          url = cl.getResource(ENCODINGS_FILE);
        }
      if (url == null)
        url = ClassLoader.getSystemResource(ENCODINGS_FILE);
// ...

2) Are you sure that having ENCODINGS_FILE with package name prepended is
safe for using with non-system class loaders - those except static
ClassLoader.getSystemResource() ? I am not a smart guy in class loading :) ,
I just have re-read the Sun guidelines at
http://java.sun.com/j2se/1.3/docs/guide/resources/resources.html and got an
impression that package name is expected to be prepended only for static
ClassLoader.getSystemResource() . Can't it happen that package name gets
prepended twice while resource name resolving in our case?  I'm also not
sure whether it should be better formatted as relative or absolute for the
system class loader...

Regards,
Sergey


----- Original Message -----
From: "Gary L Peskin" <[EMAIL PROTECTED]>
To: "'Ushakov, Sergey N'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 8:03 AM
Subject: RE: New Xalan not playing well with Tomcat 4.0?


> Sergey --
>
> I've been out of town.  Did you ever get a satisfactory answer to this?
>
> Gary
>
> > -----Original Message-----
> > From: Ushakov, Sergey N [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, June 03, 2002 10:00 PM
> > To: [EMAIL PROTECTED]
> > Cc: Gary L Peskin
> > Subject: Re: New Xalan not playing well with Tomcat 4.0?
> >
> >
> > Gary,
> >
> > I've looked into Xalan sources and saw that context class
> > loaders are widely used. But I could not catch the idea beyond it.
> >
> > Isn't it expected that if a standard Xalan resource is
> > required then it is loaded from the Xalan bundle? Is a
> > context class loader necessary for it?
> >
> > Sorry if I'm asking something obvious.
> >
> > Regards,
> > Sergey
> >
> >
> >
> > ----- Original Message -----
> > From: "Gary L Peskin" <[EMAIL PROTECTED]>
> > To: "'Ushakov, Sergey N'" <[EMAIL PROTECTED]>;
> > <[EMAIL PROTECTED]>
> > Cc: "'Bryan Kearney'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Monday, June 03, 2002 5:34 PM
> > Subject: RE: New Xalan not playing well with Tomcat 4.0?
> >
> >
> > > Miriam --
> > >
> > > A problem here (which is still here) is that the classloader being
> > > obtained is the one used to load the Encodings class and not the
> > > ContextClassLoader.  Unfortunately, I'm travelling and
> > don't have time
> > > to clean this up.  Can you or Joe take care of it?
> > >
> > > Gary
> > >
> >
> > [...]
> >
>
>

Reply via email to