You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Gary L Peskin <ga...@firstech.com> on 2000/12/03 22:51:41 UTC

Re: ContextClassLoader for java extensions

Martin Klang wrote:
> 
> hiyall,
> 
> we had a discussion a couple of weeks ago regarding the way xalan loads
> extension classes. i believe the consensus was that it would be nice
> if xalan could use the ContextClassLoader introduced in jdk1.2, without
> breaking jdk1.1 compatibility. and so here's the patch :)

Martin's change is now committed to CVS.  Thanks, Martin.  I've also
made the corresponding changes in XalanJ2.

I had to make one small change.  The Class.forName method with three
arguments was not supported until Java2.  Thus, Martin's change required
that XalanJ1 be compiled only under Java2, even though it would execute
just fine with Java 1.1.x.

I changed Class.forName to a call to contextClassLoader.loadClass().  I
think that in the way XalanJ uses this, this shouldn't be a problem.

Since I don't have Tomcat (or any servlet engine) installed, I would
appreciate people testing this, when convenient, in both XalanJ1 and
XalanJ2.

Thanks again to Martin for this change.

Gary

Re: ContextClassLoader for java extensions

Posted by Martin Klang <ma...@pingdynasty.com>.
On Sun, 3 Dec 2000, Gary L Peskin wrote:
> 
> I had to make one small change.  The Class.forName method with three
> arguments was not supported until Java2.  Thus, Martin's change required
> that XalanJ1 be compiled only under Java2, even though it would execute
> just fine with Java 1.1.x.
> 
> I changed Class.forName to a call to contextClassLoader.loadClass().  I
> think that in the way XalanJ uses this, this shouldn't be a problem.
> 
> Since I don't have Tomcat (or any servlet engine) installed, I would
> appreciate people testing this, when convenient, in both XalanJ1 and
> XalanJ2.

good stuff - i didn't try compiling it on jdk1.1 so i wasn't aware of
this. i'll try to test it with tomcat and an ejb-server sometime today
(at least xalanJ 1), but i shouldn't think there'd be any problems.

> 
> Thanks again to Martin for this change.

my pleasure - glad to be able to contribute :>

/m