openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1685118 - /openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java
Date Fri, 12 Jun 2015 16:06:05 GMT
Author: struberg
Date: Fri Jun 12 16:06:05 2015
New Revision: 1685118

URL: http://svn.apache.org/r1685118
Log:
OWB-1083 avoid HttpSession creation during context destroyal

Txs to Adam Cornett for the report and partly fix!

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=1685118&r1=1685117&r2=1685118&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
Fri Jun 12 16:06:05 2015
@@ -410,7 +410,7 @@ public class WebContextsService extends
             Object payload = null;
             if (context.getServletRequest() != null)
             {
-                payload = context.getServletRequest().getSession();
+                payload = context.getServletRequest().getSession(false);
             }
 
             webBeansContext.getBeanManagerImpl().fireContextLifecyleEvent(
@@ -537,9 +537,9 @@ public class WebContextsService extends
             ServletRequestContext requestContext = getRequestContext(true);
 
             if (destroySessionImmediately
-                    || requestContext == null || requestContext.getServletRequest() == null
-                || requestContext.getServletRequest().getSession() == null
-                    || sessionIsExpiring)
+                || requestContext == null || requestContext.getServletRequest() == null
+                || requestContext.getServletRequest().getSession(false) == null
+                || sessionIsExpiring)
             {
                 context.destroy();
                 webBeansContext.getBeanManagerImpl().fireContextLifecyleEvent(



Mime
View raw message