tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r988545 - in /tomcat/sandbox/tomcat-oacc/trunk: docs/changelog.xml src/share/org/apache/catalina/cluster/session/DeltaManager.java
Date Tue, 24 Aug 2010 13:59:27 GMT
Author: rjung
Date: Tue Aug 24 13:59:27 2010
New Revision: 988545

URL: http://svn.apache.org/viewvc?rev=988545&view=rev
Log:
Add Null check when CHANGE_SESSION_ID message received.

Backport of r982877 from trunk.

Modified:
    tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml
    tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaManager.java

Modified: tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml?rev=988545&r1=988544&r2=988545&view=diff
==============================================================================
--- tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml (original)
+++ tomcat/sandbox/tomcat-oacc/trunk/docs/changelog.xml Tue Aug 24 13:59:27 2010
@@ -32,6 +32,9 @@
 <section name="Tomcat OACC 0.1 (rjung)">
   <subsection name="Cluster">
       <fix>
+        Add Null check when CHANGE_SESSION_ID message received. (rjung)
+      </fix>
+      <fix>
         <bug>49127</bug>: Don't swallow exceptions unnecessarily in
         <code>SimpleTcpReplicationManager.startInternal()</code>. (rjung)
       </fix>

Modified: tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaManager.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaManager.java?rev=988545&r1=988544&r2=988545&view=diff
==============================================================================
--- tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaManager.java
(original)
+++ tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/DeltaManager.java
Tue Aug 24 13:59:27 2010
@@ -1716,13 +1716,15 @@ public class DeltaManager extends Cluste
     protected void handleCHANGE_SESSION_ID(SessionMessage msg,Member sender) throws IOException
{
         counterReceive_EVT_CHANGE_SESSION_ID++;
         DeltaSession session = (DeltaSession) findSession(msg.getSessionID());
-        String newSessionID = deserializeSessionId(msg.getSession());
-        session.setPrimarySession(false);
-        if(notifySessionListenersOnReplication) {
-            session.setId(newSessionID);
-        } else {
-            session.setIdInternal(newSessionID);
-            add(session);
+        if (session != null) {
+            String newSessionID = deserializeSessionId(msg.getSession());
+            session.setPrimarySession(false);
+            if(notifySessionListenersOnReplication) {
+                session.setId(newSessionID);
+            } else {
+                session.setIdInternal(newSessionID);
+                add(session);
+            }
         }
     }
 



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


Mime
View raw message