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 DeltaRequest.java DeltaSession.java
Date Fri, 06 Feb 2004 17:30:13 GMT
fhanik      2004/02/06 09:30:13

  Modified:    modules/cluster/src/share/org/apache/catalina/cluster/session
                        DeltaManager.java DeltaRequest.java
                        DeltaSession.java
  Log:
  Implemented access logic on the delta request, fixed double expiration on the session
  
  Revision  Changes    Path
  1.15      +8 -7      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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- DeltaManager.java	6 Feb 2004 16:15:32 -0000	1.14
  +++ DeltaManager.java	6 Feb 2004 17:30:13 -0000	1.15
  @@ -949,7 +949,6 @@
        * Invalidate all sessions that have expired.
        */
       public void processExpires() {
  -
           long timeNow = System.currentTimeMillis();
           Session sessions[] = findSessions();
   
  @@ -958,7 +957,6 @@
               if (!session.isValid()) {
                   try {
                       expiredSessions++;
  -                    session.expire();
                   } catch (Throwable t) {
                       log.error(sm.getString
                                 ("standardManager.expireException"), t);
  @@ -967,17 +965,20 @@
           }
           long timeEnd = System.currentTimeMillis();
           processingTime += ( timeEnd - timeNow );
  -
       }
  +
       public boolean getStateTransferred() {
           return stateTransferred;
       }
  +
       public void setStateTransferred(boolean stateTransferred) {
           this.stateTransferred = stateTransferred;
       }
  +
       public CatalinaCluster getCluster() {
           return cluster;
       }
  +
       public void setCluster(CatalinaCluster cluster) {
           this.cluster = cluster;
       }
  
  
  
  1.6       +5 -3      jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaRequest.java
  
  Index: DeltaRequest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaRequest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DeltaRequest.java	5 Feb 2004 21:08:02 -0000	1.5
  +++ DeltaRequest.java	6 Feb 2004 17:30:13 -0000	1.6
  @@ -161,6 +161,7 @@
       public void execute(DeltaSession session) {
           if ( !this.sessionId.equals( session.getId() ) )
               throw new java.lang.IllegalArgumentException("Session id mismatch, not executing
the delta request");
  +        session.access();
           for ( int i=0; i<actions.size(); i++ ) {
               AttributeInfo info = (AttributeInfo)actions.get(i);
               switch ( info.getType() ) {
  @@ -191,6 +192,7 @@
                   default : throw new java.lang.IllegalArgumentException("Invalid attribute
info type="+info);
               }//switch
           }//for
  +        session.endAccess();
       }
   
       public void reset() {
  
  
  
  1.16      +5 -6      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.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- DeltaSession.java	6 Feb 2004 16:15:32 -0000	1.15
  +++ DeltaSession.java	6 Feb 2004 17:30:13 -0000	1.16
  @@ -661,7 +661,7 @@
                   //the primary session has probably crashed, and no other
                   //requests are coming in. that is why we do this. otherwise
                   //we would have a memory leak
  -                expire(true);
  +                expire(true,false);
               }
           }
   
  @@ -745,7 +745,6 @@
           // Mark this session as "being expired" if needed
           if (expiring)
               return;
  -        
           String expiredId = getId();
   
           synchronized (this) {
  
  
  

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