openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1677983 - /openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java
Date Wed, 06 May 2015 13:22:15 GMT
Author: struberg
Date: Wed May  6 13:22:14 2015
New Revision: 1677983

URL: http://svn.apache.org/r1677983
Log:
OWB-1048 only postpone session destroyal if the request is really a servlet request

We do NOT postpone the session destroyal if the destroySessionContext only got
triggered by a session eviction timeout

Modified:
    openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java

Modified: openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java?rev=1677983&r1=1677982&r2=1677983&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java
(original)
+++ openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java
Wed May  6 13:22:14 2015
@@ -373,7 +373,8 @@ public class WebContextsService extends
 
         if (context.getPropagatedSessionContext() != null)
         {
-            context.destroy();
+            SessionContext sessionContext = context.getPropagatedSessionContext();
+            sessionContext.destroy();
 
             Object payload = null;
             if (context.getServletRequest() != null)
@@ -497,7 +498,8 @@ public class WebContextsService extends
             // we need to mark the conversation to get destroyed at the end of the request
             ServletRequestContext requestContext = getRequestContext(true);
 
-            if (destroySessionImmediately || requestContext == null)
+            if (destroySessionImmediately || requestContext == null
+                    || requestContext.getServletRequest() == null || requestContext.getServletRequest().getSession()
== null)
             {
                 context.destroy();
                 webBeansContext.getBeanManagerImpl().fireEvent(session != null ? session
: new Object(), DestroyedLiteral.INSTANCE_SESSION_SCOPED);



Mime
View raw message