[webbeans-commits] Webbeans SVN: r428 - ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Sat Dec 6 17:40:50 EST 2008
Author: gavin.king at jboss.com
Date: 2008-12-06 17:40:50 -0500 (Sat, 06 Dec 2008)
New Revision: 428
Added:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/CurrentManager.java
Log:
move the statics somewhere else
Added: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/CurrentManager.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/CurrentManager.java (rev 0)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/CurrentManager.java 2008-12-06 22:40:50 UTC (rev 428)
@@ -0,0 +1,31 @@
+package org.jboss.webbeans;
+
+import org.jboss.webbeans.contexts.ApplicationContext;
+import org.jboss.webbeans.contexts.RequestContext;
+import org.jboss.webbeans.contexts.SessionContext;
+
+public class CurrentManager {
+
+ protected static ManagerImpl rootManager = new ManagerImpl();
+
+ public static ManagerImpl rootManager()
+ {
+ return rootManager;
+ }
+
+ public static void setRootManager(ManagerImpl rootManager) {
+ CurrentManager.rootManager = rootManager;
+ }
+
+ /**
+ * Set up the root manager.
+ * TODO: move this to Bootstrap
+ */
+ static {
+ rootManager = new ManagerImpl();
+ rootManager.addContext(RequestContext.INSTANCE);
+ rootManager.addContext(SessionContext.INSTANCE);
+ rootManager.addContext(ApplicationContext.INSTANCE);
+ }
+
+}
More information about the weld-commits
mailing list