tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billbar...@apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/generators Jdk12Interceptor.java
Date Tue, 27 Apr 2004 02:45:13 GMT
billbarker    2004/04/26 19:45:13

  Modified:    src/share/org/apache/tomcat/modules/generators
                        Jdk12Interceptor.java
  Log:
  Reset the Context CL correctly after an include.  Also, adding a PostRequest so the the
Context CL is in a defined state after the request finishes.
  
  The rule is that if the Child has a Parent, then the Parent is the request that included.
 Otherwise, the including request is the top-level one.
  
  There are still CL issues with cross-context RD reqests, but this at least fixes the bug
that was there with same-context RD requests.
  
  Fix for Bug #28590
  Reported By: Hugh J. Lee hughjlee@yahoo.com
  
  Revision  Changes    Path
  1.11      +9 -4      jakarta-tomcat/src/share/org/apache/tomcat/modules/generators/Jdk12Interceptor.java
  
  Index: Jdk12Interceptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/generators/Jdk12Interceptor.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Jdk12Interceptor.java	25 Feb 2004 06:52:40 -0000	1.10
  +++ Jdk12Interceptor.java	27 Apr 2004 02:45:12 -0000	1.11
  @@ -93,11 +93,16 @@
   
   	// after include, reset the class loader
   	// fix for 1112
  -	request=child.getParent();
  -	if( request != null )
  -	    fixJDKContextClassLoader(request.getContext());
  +	Request chParent=child.getParent();
  +	if( chParent != null )
  +	    fixJDKContextClassLoader(chParent.getContext());
   	else
  -	    jdk11Compat.setContextClassLoader(this.getClass().getClassLoader());
  +	    fixJDKContextClassLoader(request.getContext());
  +	return 0;
  +    }
  +
  +    public int postRequest(Request request, Response response) {
  +	jdk11Compat.setContextClassLoader(this.getClass().getClassLoader());
   	return 0;
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message