xalan-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tmil...@apache.org
Subject cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/trax TemplatesImpl.java
Date Fri, 01 Mar 2002 19:17:22 GMT
tmiller     02/03/01 11:17:22

  Modified:    java/src/org/apache/xalan/xsltc/trax TemplatesImpl.java
  Log:
  Tomcat 4.x external Java class bug fix, Tomcat 4.x
  could not find external java classes, contrib by Santiago Pericas
  
  Revision  Changes    Path
  1.10      +9 -3      xml-xalan/java/src/org/apache/xalan/xsltc/trax/TemplatesImpl.java
  
  Index: TemplatesImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/trax/TemplatesImpl.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TemplatesImpl.java	29 Nov 2001 09:33:35 -0000	1.9
  +++ TemplatesImpl.java	1 Mar 2002 19:17:22 -0000	1.10
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: TemplatesImpl.java,v 1.9 2001/11/29 09:33:35 morten Exp $
  + * @(#)$Id: TemplatesImpl.java,v 1.10 2002/03/01 19:17:22 tmiller Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -59,6 +59,7 @@
    * @author Morten Jorgensen
    * @author G. Todd Millerj
    * @author Jochen Cordes <Jochen.Cordes@t-online.de>
  + * @author Santiago Pericas-Geertsen 
    *
    */
   
  @@ -176,8 +177,13 @@
   	    (TransletClassLoader) AccessController.doPrivileged(
   		new PrivilegedAction() {
   			public Object run() {
  -			    ClassLoader current = getClass().getClassLoader();
  -			    return new TransletClassLoader(current);
  +			    /* 
  +			     * Get the loader from the current thread instead of
  +			     * the class. This is important for translets that load
  +			     * external Java classes and run in multi-threaded envs.
  +			     */
  +			    return new TransletClassLoader(
  +				Thread.currentThread().getContextClassLoader());
   			}
   		    }
   		);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org


Mime
View raw message