openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1678053 - /openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/context/WebContextsService.java
Date Wed, 06 May 2015 18:26:09 GMT
Author: struberg
Date: Wed May  6 18:26:08 2015
New Revision: 1678053

URL: http://svn.apache.org/r1678053
Log:
OWB-1048 only init sessionContext if the attribute is set

That way we prevent touching the session if we don't need.
And we also prevent sending out superfluous @Destroyed(SessionScoped.class) events

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=1678053&r1=1678052&r2=1678053&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 18:26:08 2015
@@ -452,7 +452,7 @@ public class WebContextsService extends
         if (endObject != null && endObject instanceof HttpSession)
         {
             session = (HttpSession) endObject;
-            if (context == null)
+            if (context == null && session.getAttribute(OWB_SESSION_CONTEXT_ATTRIBUTE_NAME)
!= null)
             {
                 // init in this case only attaches the existing session to the ThreadLocal
                 initSessionContext(session);



Mime
View raw message