tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1509722 - /tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/cdi/SessionNormalScopeBeanHandler.java
Date Fri, 02 Aug 2013 14:14:07 GMT
Author: rmannibucau
Date: Fri Aug  2 14:14:07 2013
New Revision: 1509722

URL: http://svn.apache.org/r1509722
Log:
making objects static in SessionNormalScopeBeanHandler

Modified:
    tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/cdi/SessionNormalScopeBeanHandler.java

Modified: tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/cdi/SessionNormalScopeBeanHandler.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/cdi/SessionNormalScopeBeanHandler.java?rev=1509722&r1=1509721&r2=1509722&view=diff
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/cdi/SessionNormalScopeBeanHandler.java
(original)
+++ tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/cdi/SessionNormalScopeBeanHandler.java
Fri Aug  2 14:14:07 2013
@@ -41,18 +41,18 @@ public class SessionNormalScopeBeanHandl
         }
     }
 
-    private final ThreadLocal<Map<Bean<?>, UpdateInfo>> objects = new ThreadLocal<Map<Bean<?>,
UpdateInfo>>() {
+    private static final ThreadLocal<Map<Bean<?>, UpdateInfo>> OBJECTS
= new ThreadLocal<Map<Bean<?>, UpdateInfo>>() {
         @Override
         protected Map<Bean<?>, UpdateInfo> initialValue() {
             CdiAppContextsService.pushRequestReleasable(new Runnable() { // update in batch
                 @Override
                 public void run() {
-                    final Map<Bean<?>, UpdateInfo> values = objects.get();
+                    final Map<Bean<?>, UpdateInfo> values = OBJECTS.get();
                     for (final UpdateInfo o : values.values()) {
                         o.updateBean();
                     }
                     values.clear();
-                    objects.remove();
+                    OBJECTS.remove();
                 }
             });
             return new HashMap<Bean<?>, UpdateInfo>();
@@ -66,7 +66,7 @@ public class SessionNormalScopeBeanHandl
     @Override
     public Object get() {
         final Object webbeansInstance = getContextualInstance();
-        final Map<Bean<?>, UpdateInfo> beanUpdateInfoMap = objects.get();
+        final Map<Bean<?>, UpdateInfo> beanUpdateInfoMap = OBJECTS.get();
 
         UpdateInfo info = beanUpdateInfoMap.get(this);
         if (info == null) {



Mime
View raw message