tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat/src/facade22/org/apache/tomcat/facade HttpServletRequestFacade.java HttpSessionFacade.java JspInterceptor.java
Date Fri, 09 Mar 2001 23:34:00 GMT
costin      01/03/09 15:34:00

  Modified:    src/facade22/org/apache/tomcat/facade
                        HttpServletRequestFacade.java
                        HttpSessionFacade.java JspInterceptor.java
  Log:
  Fix for #429 - different session facade returned in different requests.
  
  Now the session facade is 1-1 associated with the real session,
  instead of beeing recycled with the request.
  
  Thanks gokul.singh@wipro.com (Gokul Singh) for reporting the bug.
  
  Revision  Changes    Path
  1.21      +9 -4      jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpServletRequestFacade.java
  
  Index: HttpServletRequestFacade.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpServletRequestFacade.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- HttpServletRequestFacade.java	2001/03/06 16:07:44	1.20
  +++ HttpServletRequestFacade.java	2001/03/09 23:33:59	1.21
  @@ -111,7 +111,7 @@
   	usingReader=false;
   	usingStream=false;
   	parametersProcessed=false;
  -	if( sessionFacade!=null) sessionFacade.recycle();
  +	sessionFacade=null;
   	if( isFacade != null ) isFacade.recycle();
   	isFacadeInitialized=false;
       }
  @@ -437,12 +437,17 @@
   
   	// No real session, return null
   	if( realSession == null ) {
  -	    if( sessionFacade!= null) sessionFacade.recycle();
  +	    sessionFacade=null;
   	    return null;
   	}
  -	if(sessionFacade==null)
  +
  +	
  +	sessionFacade=(HttpSessionFacade)realSession.getFacade();
  +	if( sessionFacade==null ) {
   	    sessionFacade=new HttpSessionFacade();
  -	sessionFacade.setRealSession( realSession );
  +	    sessionFacade.setRealSession( realSession );
  +	    realSession.setFacade( sessionFacade );
  +	}
           return sessionFacade;
       }
   
  
  
  
  1.8       +1 -1      jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpSessionFacade.java
  
  Index: HttpSessionFacade.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpSessionFacade.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- HttpSessionFacade.java	2001/02/20 03:34:11	1.7
  +++ HttpSessionFacade.java	2001/03/09 23:33:59	1.8
  @@ -107,7 +107,7 @@
       /** Package-level method - accessible only by core
        */
       void recycle() {
  -	realSession=null;
  +	//	realSession=null;
       }
   
       // -------------------- public facade --------------------
  
  
  
  1.17      +1 -1      jakarta-tomcat/src/facade22/org/apache/tomcat/facade/JspInterceptor.java
  
  Index: JspInterceptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/JspInterceptor.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- JspInterceptor.java	2001/02/27 16:56:33	1.16
  +++ JspInterceptor.java	2001/03/09 23:33:59	1.17
  @@ -336,7 +336,7 @@
   	}
   
   	Handler wrapper=req.getHandler();
  -
  +	
   	if( wrapper==null )
   	    return 0;
   
  
  
  

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


Mime
View raw message