geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdam...@apache.org
Subject svn commit: r734359 - /geronimo/server/trunk/plugins/jetty/geronimo-jetty6-clustering-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/ClusteredSessionManager.java
Date Wed, 14 Jan 2009 07:57:28 GMT
Author: gdamour
Date: Tue Jan 13 23:57:28 2009
New Revision: 734359

URL: http://svn.apache.org/viewvc?rev=734359&view=rev
Log:
When a session is invalidated, notifySessionDestruction does not need to be executed. We detect
that a session has been invalidated by checking if it still exists or not

Modified:
    geronimo/server/trunk/plugins/jetty/geronimo-jetty6-clustering-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/ClusteredSessionManager.java

Modified: geronimo/server/trunk/plugins/jetty/geronimo-jetty6-clustering-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/ClusteredSessionManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty/geronimo-jetty6-clustering-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/ClusteredSessionManager.java?rev=734359&r1=734358&r2=734359&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty/geronimo-jetty6-clustering-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/ClusteredSessionManager.java
(original)
+++ geronimo/server/trunk/plugins/jetty/geronimo-jetty6-clustering-wadi/src/main/java/org/apache/geronimo/jetty6/cluster/ClusteredSessionManager.java
Tue Jan 13 23:57:28 2009
@@ -109,26 +109,26 @@
 
         public void notifyOutboundSessionMigration(org.apache.geronimo.clustering.Session
session) {
             ClusteredSession clusteredSession = getClusteredSession(session);
+            if (null == clusteredSession) {
+                throw new AssertionError("Session [" + session + "] is undefined");
+            }
             removeSession(clusteredSession, false);
         }
 
         public void notifySessionDestruction(org.apache.geronimo.clustering.Session session)
{
             ClusteredSession clusteredSession = getClusteredSession(session);
+            if (null == clusteredSession) {
+                return;
+            }
             removeSession(clusteredSession, true);
         }
         
-        private ClusteredSession getClusteredSession(org.apache.geronimo.clustering.Session
session) throws AssertionError {
-            ClusteredSession clusteredSession;
+        private ClusteredSession getClusteredSession(org.apache.geronimo.clustering.Session
session) {
             synchronized (idToSession) {
-                clusteredSession = idToSession.remove(session.getSessionId());
+                return idToSession.remove(session.getSessionId());
             }
-            if (null == clusteredSession) {
-                throw new AssertionError("Session [" + session + "] is undefined");
-            }
-            return clusteredSession;
         }
         
-        
     }
 
     public class ClusteredSession extends Session {



Mime
View raw message