openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r735508 - in /incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans: config/WebBeansFinder.java context/SessionContextManager.java
Date Sun, 18 Jan 2009 17:21:33 GMT
Author: gerdogdu
Date: Sun Jan 18 09:21:29 2009
New Revision: 735508

URL: http://svn.apache.org/viewvc?rev=735508&view=rev
Log:
Adding classloader singleton support for SessionContextManager

Modified:
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansFinder.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/SessionContextManager.java

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansFinder.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansFinder.java?rev=735508&r1=735507&r2=735508&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansFinder.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansFinder.java
Sun Jan 18 09:21:29 2009
@@ -41,6 +41,8 @@
     public static final String SINGLETON_XML_SPECIALIZES_MANAGER = "org.apache.webbeans.xml.XMLSpecializesManager";
 
     public static final String SINGLETON_INJECTION_RESOLVER = "org.apache.webbeans.container.InjectionResolver";
+    
+    public static final String SINGLETON_SESSION_CONTEXT_MANAGER = "org.apache.webbeans.context.SessionContextManager";
 
     private static Map<String, Map<ClassLoader, Object>> singletonMap = new HashMap<String,
Map<ClassLoader, Object>>();
 

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/SessionContextManager.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/SessionContextManager.java?rev=735508&r1=735507&r2=735508&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/SessionContextManager.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/SessionContextManager.java
Sun Jan 18 09:21:29 2009
@@ -18,27 +18,23 @@
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 
+import org.apache.webbeans.config.WebBeansFinder;
 import org.apache.webbeans.util.Asserts;
 
-public final class SessionContextManager
+public class SessionContextManager
 {
-    private static SessionContextManager sessionContextManager = null;
-
     private Map<String, SessionContext> sessionContexts = null;
 
-    private SessionContextManager()
+    public SessionContextManager()
     {
 
     }
 
     public static SessionContextManager getInstance()
     {
-        if (sessionContextManager == null)
-        {
-            sessionContextManager = new SessionContextManager();
-            sessionContextManager.sessionContexts = new ConcurrentHashMap<String, SessionContext>();
-        }
-
+        SessionContextManager sessionContextManager = (SessionContextManager)WebBeansFinder.getSingletonInstance(WebBeansFinder.SINGLETON_SESSION_CONTEXT_MANAGER);
+        sessionContextManager.sessionContexts = new ConcurrentHashMap<String, SessionContext>();
+        
         return sessionContextManager;
     }
 



Mime
View raw message