You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by la...@apache.org on 2001/03/22 02:44:16 UTC
cvs commit: jakarta-tomcat/src/facade22/org/apache/tomcat/facade Servlet22Interceptor.java
larryi 01/03/21 17:44:15
Modified: src/facade22/org/apache/tomcat/facade
Servlet22Interceptor.java
Log:
Now that the session facade is 1-1 associated with the real session, we
can use that facade when calling valueUnbound() rather than using a
temporary one. This patch undoes the last patch since it is no longer
needed.
Revision Changes Path
1.13 +4 -20 jakarta-tomcat/src/facade22/org/apache/tomcat/facade/Servlet22Interceptor.java
Index: Servlet22Interceptor.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/Servlet22Interceptor.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- Servlet22Interceptor.java 2001/02/28 20:43:58 1.12
+++ Servlet22Interceptor.java 2001/03/22 01:44:11 1.13
@@ -173,15 +173,9 @@
newState==ServerSession.STATE_EXPIRED ) {
// generate "unbould" events when the session is suspended or
- // expired :
-
- // Session facades are managed by the request facades.
- // So, the facade returned at this point by the method getFacade()
- // of ServerSession is not valid : it could refer to a session facade
- // that is unused, or used by a request facade for another server session.
- // That's why we have to manage our own facade.
- HttpSessionFacade sessionFacade = new HttpSessionFacade();
-
+ // expired
+ HttpSession httpSess=(HttpSession)sess.getFacade();
+
Vector removed=new Vector();
Enumeration e = sess.getAttributeNames();
// announce all values with listener that we'll remove them
@@ -189,22 +183,12 @@
String key = (String) e.nextElement();
Object value = sess.getAttribute(key);
- sessionFacade.setRealSession(sess);
-
if( value instanceof HttpSessionBindingListener) {
((HttpSessionBindingListener) value).valueUnbound
- (new HttpSessionBindingEvent(sessionFacade , key));
+ (new HttpSessionBindingEvent(httpSess , key));
removed.addElement( key );
}
-
- // prevents a session crossover
- sess.setFacade( null );
}
-
- // helps garbage collector
- sessionFacade.recycle();
- sessionFacade = null;
-
// remove
e=removed.elements();
while( e.hasMoreElements() ) {