tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r561803 - in /tomcat/container/tc5.5.x: modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java webapps/docs/changelog.xml
Date Wed, 01 Aug 2007 14:09:42 GMT
Author: pero
Date: Wed Aug  1 07:09:41 2007
New Revision: 561803

URL: http://svn.apache.org/viewvc?view=rev&rev=561803
Log:
Don't send a message if no cluster member exists.

Modified:
    tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java
    tomcat/container/tc5.5.x/webapps/docs/changelog.xml

Modified: tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java?view=diff&rev=561803&r1=561802&r2=561803
==============================================================================
--- tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java
(original)
+++ tomcat/container/tc5.5.x/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java
Wed Aug  1 07:09:41 2007
@@ -665,7 +665,7 @@
      * @param session
      */
     protected void sendCreateSession(String sessionId, DeltaSession session) {
-        if(cluster.getMembers().length > 0 ) {
+        if(cluster != null && cluster.getMembers().length > 0 ) {
             SessionMessage msg = new SessionMessageImpl(getName(),
                     SessionMessage.EVT_SESSION_CREATED, null, sessionId,
                     sessionId + "-" + System.currentTimeMillis());
@@ -1431,14 +1431,17 @@
      *            session id
      */
     protected void sessionExpired(String id) {
-        counterSend_EVT_SESSION_EXPIRED++ ;
-        SessionMessage msg = new SessionMessageImpl(getName(),
-                SessionMessage.EVT_SESSION_EXPIRED, null, id, id
-                + "-EXPIRED-MSG");
-        if (log.isDebugEnabled())
-            log.debug(sm.getString("deltaManager.createMessage.expire",
-                    getName(), id));
-        send(msg);
+        // FIX BUG 42720 : don't send a message if no cluster member exists.
+        if (cluster != null && cluster.getMembers().length > 0) {
+            counterSend_EVT_SESSION_EXPIRED++ ;
+            SessionMessage msg = new SessionMessageImpl(getName(),
+                    SessionMessage.EVT_SESSION_EXPIRED, null, id, id
+                    + "-EXPIRED-MSG");
+            if (log.isDebugEnabled())
+                log.debug(sm.getString("deltaManager.createMessage.expire",
+                        getName(), id));
+            send(msg);
+        }
     }
 
     /**

Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?view=diff&rev=561803&r1=561802&r2=561803
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Wed Aug  1 07:09:41 2007
@@ -108,6 +108,10 @@
          Fix timeout setting on a replicated DeltaSession.
          Patch by Alexander Maas (fhanik,pero)
      </fix>
+     <fix>  
+         <bug>42720</bug>: Don't send a message if no cluster member exists.
+         Patch by Keiichi Fujino (pero)
+     </fix>  
     </changelog>
   </subsection>
 </section>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message