tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session StandardManager.java StandardSession.java
Date Tue, 06 Feb 2001 17:12:30 GMT
craigmcc    01/02/06 09:12:29

  Modified:    catalina/src/share/org/apache/catalina/session
                        StandardManager.java StandardSession.java
  Log:
  Update StandardManager and StandardSession to be no longer "final".
  
  When saving and restoring sessions across restarts, call the passivate()
  and activate() methods (so that activation events get fired), and do not
  call removeAttribute() and setAttribute() - this triggered redundant firing
  of the binding events.
  
  Revision  Changes    Path
  1.6       +7 -5      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardManager.java
  
  Index: StandardManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardManager.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- StandardManager.java	2000/12/22 01:54:33	1.5
  +++ StandardManager.java	2001/02/06 17:12:26	1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardManager.java,v
1.5 2000/12/22 01:54:33 craigmcc Exp $
  - * $Revision: 1.5 $
  - * $Date: 2000/12/22 01:54:33 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardManager.java,v
1.6 2001/02/06 17:12:26 craigmcc Exp $
  + * $Revision: 1.6 $
  + * $Date: 2001/02/06 17:12:26 $
    *
    * ====================================================================
    *
  @@ -105,10 +105,10 @@
    * <code>stop()</code> methods of this class at the correct times.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.5 $ $Date: 2000/12/22 01:54:33 $
  + * @version $Revision: 1.6 $ $Date: 2001/02/06 17:12:26 $
    */
   
  -public final class StandardManager
  +public class StandardManager
       extends ManagerBase
       implements Lifecycle, PropertyChangeListener, Runnable {
   
  @@ -387,6 +387,7 @@
                       session.readObjectData(ois);
   		    session.setManager(this);
   		    sessions.put(session.getId(), session);
  +		    ((StandardSession) session).activate();
   		}
   	    } catch (ClassNotFoundException e) {
   		if (ois != null) {
  @@ -474,6 +475,7 @@
   		    StandardSession session =
                           (StandardSession) elements.next();
                       list.add(session);
  +		    ((StandardSession) session).passivate();
                       session.writeObjectData(oos);
   		}
   	    } catch (IOException e) {
  
  
  
  1.13      +8 -6      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardSession.java
  
  Index: StandardSession.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardSession.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- StandardSession.java	2001/02/04 00:51:20	1.12
  +++ StandardSession.java	2001/02/06 17:12:26	1.13
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardSession.java,v
1.12 2001/02/04 00:51:20 glenn Exp $
  - * $Revision: 1.12 $
  - * $Date: 2001/02/04 00:51:20 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardSession.java,v
1.13 2001/02/06 17:12:26 craigmcc Exp $
  + * $Revision: 1.13 $
  + * $Date: 2001/02/06 17:12:26 $
    *
    * ====================================================================
    *
  @@ -110,10 +110,10 @@
    * @author Craig R. McClanahan
    * @author Sean Legassick
    * @author <a href="mailto:jon@latchkey.com">Jon S. Stevens</a>
  - * @version $Revision: 1.12 $ $Date: 2001/02/04 00:51:20 $
  + * @version $Revision: 1.13 $ $Date: 2001/02/06 17:12:26 $
    */
   
  -final class StandardSession
  +class StandardSession
       implements HttpSession, Session, Serializable {
   
   
  @@ -1111,7 +1111,9 @@
               if (debug >= 2)
                   log("  loading attribute '" + name +
                       "' with value '" + value + "'");
  -            setAttribute(name, value);
  +	    synchronized (attributes) {
  +	        attributes.put(name, value);
  +	    }
   	}
           isValid = isValidSave;
   
  
  
  

Mime
View raw message