tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session DeltaManager.java DeltaSession.java
Date Fri, 06 Feb 2004 16:15:32 GMT
fhanik      2004/02/06 08:15:32

  Modified:    modules/cluster/src/share/org/apache/catalina/cluster/session
                        DeltaManager.java DeltaSession.java
  Log:
  Fix for bug 26715, a replicated session will never expire if the primary server crashes.
  This will fix that.
  
  Revision  Changes    Path
  1.14      +9 -4      jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java
  
  Index: DeltaManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- DeltaManager.java	5 Feb 2004 23:01:29 -0000	1.13
  +++ DeltaManager.java	6 Feb 2004 16:15:32 -0000	1.14
  @@ -484,7 +484,12 @@
                       session.setManager(this);
                       session.setValid(true);
                       session.setPrimarySession(false);
  +                    //in case the nodes in the cluster are out of 
  +                    //time synch, this will make sure that we have the
  +                    //correct timestamp, isValid returns true, cause accessCount=1
                       session.access();
  +                    //make sure that the session gets ready to expire if needed
  +                    session.setAccessCount(0);
                       sessions.put(session.getId(), session);
                   }
               } catch (ClassNotFoundException e) {
  
  
  
  1.15      +12 -4     jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java
  
  Index: DeltaSession.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaSession.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- DeltaSession.java	6 Feb 2004 02:09:38 -0000	1.14
  +++ DeltaSession.java	6 Feb 2004 16:15:32 -0000	1.15
  @@ -1685,6 +1685,14 @@
       protected void setLastTimeReplicated(long lastTimeReplicated) {
           this.lastTimeReplicated = lastTimeReplicated;
       }
  +  
  +    protected void setAccessCount(int accessCount) {
  +      this.accessCount = accessCount;
  +    }
  +  
  +    protected int getAccessCount() {
  +      return accessCount;
  +    }
   
   }
   
  
  
  

---------------------------------------------------------------------
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