Author: struberg
Date: Thu Mar 29 18:06:46 2012
New Revision: 1307023

URL: http://svn.apache.org/viewvc?rev=1307023&view=rev
Log:
OWB-660 set SessionContext to ThreadLocal on activation

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=1307023&r1=1307022&r2=1307023&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
 Thu Mar 29 18:06:46 2012
@@ -806,6 +806,12 @@ public class WebContextsService extends 
                 applicationContext.set(sharedApplicationContext);
             }
         }
+        if (scopeType.equals(SessionScoped.class))
+        {
+            // getSessionContext() implicitely creates and binds the 
SessionContext
+            // to the current Thread if it doesn't yet exist.
+            getSessionContext().setActive(true);
+        }
         else
         {
             super.activateContext(scopeType);


Reply via email to