Author: cziegeler
Date: Wed Nov 25 15:17:19 2015
New Revision: 1716434

URL: http://svn.apache.org/viewvc?rev=1716434&view=rev
Log:
FELIX-5117 : Call to SSOHttpSessionListener#sessionDestroyed is done after the 
session is invalidated. Apply patch from Xavier Fournet

Modified:
    
felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HttpSessionWrapper.java

Modified: 
felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HttpSessionWrapper.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HttpSessionWrapper.java?rev=1716434&r1=1716433&r2=1716434&view=diff
==============================================================================
--- 
felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HttpSessionWrapper.java
 (original)
+++ 
felix/trunk/http/base/src/main/java/org/apache/felix/http/base/internal/handler/HttpSessionWrapper.java
 Wed Nov 25 15:17:19 2015
@@ -318,6 +318,11 @@ public class HttpSessionWrapper implemen
     {
         this.checkInvalid();
 
+        // session listener must be called before the session is invalidated
+        if (context.getHttpSessionListener() != null) {
+            context.getHttpSessionListener().sessionDestroyed(new 
HttpSessionEvent(this));
+        }
+
         if ( this.keyPrefix != null )
         {
             this.delegate.removeAttribute(ATTR_CREATED + this.sessionId);
@@ -342,10 +347,6 @@ public class HttpSessionWrapper implemen
             this.delegate.invalidate();
         }
 
-        if ( context.getHttpSessionListener() != null )
-        {
-            context.getHttpSessionListener().sessionDestroyed(new 
HttpSessionEvent(this));
-        }
         this.isInvalid = true;
     }
 


Reply via email to