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 SessionMessageImpl.java SimpleTcpReplicationManager.java
Date Sat, 29 May 2004 02:43:58 GMT
fhanik      2004/05/28 19:43:58

  Modified:    modules/cluster/src/share/org/apache/catalina/cluster/session
                        DeltaManager.java SessionMessageImpl.java
                        SimpleTcpReplicationManager.java
  Log:
  Make sure we enforce the use of unique message Ids, even though they dont have to be
  we should use the right field
  
  Revision  Changes    Path
  1.26      +9 -5      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.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- DeltaManager.java	26 May 2004 16:37:41 -0000	1.25
  +++ DeltaManager.java	29 May 2004 02:43:58 -0000	1.26
  @@ -343,7 +343,8 @@
                 getName(),
                 SessionMessage.EVT_SESSION_CREATED,
                 null,
  -              sessionId);
  +              sessionId,
  +              sessionId+System.currentTimeMillis());
             cluster.send(msg);
             session.resetDeltaRequest();
         }
  @@ -634,7 +635,8 @@
                       new SessionMessageImpl(this.getName(),
                                          SessionMessage.EVT_GET_ALL_SESSIONS,
                                          null,
  -                                       "GET-ALL");
  +                                       "GET-ALL",
  +                                       "GET-ALL-"+getName());
                   //just to make sure the other server has the context started
   //                long timetowait = 20000-mbr.getMemberAliveTime();
   //                if ( timetowait > 0 ) {
  @@ -796,6 +798,7 @@
                          msg = new SessionMessageImpl(getName(),
                                                SessionMessage.EVT_SESSION_ACCESSED,
                                                null,
  +                                             sessionId,
                                                sessionId+System.currentTimeMillis());
                      }
                      
  @@ -816,7 +819,8 @@
              SessionMessage msg = new SessionMessageImpl(getName(), 
                                                      SessionMessage.EVT_SESSION_EXPIRED,
                                                      null,
  -                                                   id);
  +                                                   id,
  +                                                   id+"-EXPIRED-MSG");
              cluster.send(msg);
          }
      
  @@ -850,7 +854,7 @@
                          log.debug("Manager ("+name+") unloading sessions complete");
                          SessionMessage newmsg = new SessionMessageImpl(name,
                              SessionMessage.EVT_ALL_SESSION_DATA,
  -                           data, "");
  +                           data, "SESSION-STATE","SESSION-STATE-"+getName());
                          cluster.send(newmsg, sender);
                          break;
                      }
  
  
  
  1.2       +1 -1      jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/SessionMessageImpl.java
  
  Index: SessionMessageImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/SessionMessageImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SessionMessageImpl.java	5 May 2004 16:36:13 -0000	1.1
  +++ SessionMessageImpl.java	29 May 2004 02:43:58 -0000	1.2
  @@ -58,7 +58,7 @@
        * @param attrValue - the value of the attribute added
   
        */
  -    public SessionMessageImpl( String contextName,
  +    private SessionMessageImpl( String contextName,
                              int eventtype,
                              byte[] session,
                              String sessionID)
  
  
  
  1.26      +6 -2      jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/SimpleTcpReplicationManager.java
  
  Index: SimpleTcpReplicationManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/SimpleTcpReplicationManager.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- SimpleTcpReplicationManager.java	28 May 2004 18:49:37 -0000	1.25
  +++ SimpleTcpReplicationManager.java	29 May 2004 02:43:58 -0000	1.26
  @@ -275,6 +275,7 @@
                       SessionMessage msg = new SessionMessageImpl(name,
                       SessionMessage.EVT_SESSION_EXPIRED,
                       null,
  +                    sessionId,
                       sessionId);
                   return msg;
                   }
  @@ -295,6 +296,7 @@
                               SessionMessage accmsg = new SessionMessageImpl(name,
                                   SessionMessage.EVT_SESSION_ACCESSED,
                                   null,
  +                                sessionId,
                                   sessionId);
                               session.setLastAccessWasDistributed(System.currentTimeMillis());
                               return accmsg;
  @@ -312,6 +314,7 @@
                       SessionMessage msg = new SessionMessageImpl(name,
                           SessionMessage.EVT_SESSION_CREATED,
                           writeSession(session),
  +                        session.getId(),
                           session.getId());
                       return msg;
                   } //end if
  @@ -449,7 +452,8 @@
                       new SessionMessageImpl(this.getName(),
                                          SessionMessage.EVT_GET_ALL_SESSIONS,
                                          null,
  -                                       "GET-ALL");
  +                                       "GET-ALL",
  +                                       "GET-ALL-"+this.getName());
                   cluster.send(msg, mbr);
                   log.warn("Manager["+getName()+"], requesting session state from "+mbr+
                            ". This operation will timeout if no session state has been received
within "+
  @@ -545,7 +549,7 @@
                       byte[] data = bout.toByteArray();
                       SessionMessage newmsg = new SessionMessageImpl(name,
                           SessionMessage.EVT_ALL_SESSION_DATA,
  -                        data, "");
  +                        data, "SESSION-STATE","SESSION-STATE-"+getName());
                       cluster.send(newmsg, sender);
                       break;
                   }
  
  
  

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