You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dj...@apache.org on 2011/01/08 19:58:46 UTC

svn commit: r1056764 - /geronimo/tck/branches/3.0/geronimo-porting/src/main/java/org/apache/geronimo/test/tck/ContextsImpl.java

Author: djencks
Date: Sat Jan  8 18:58:46 2011
New Revision: 1056764

URL: http://svn.apache.org/viewvc?rev=1056764&view=rev
Log:
OWB-503 related changes

Modified:
    geronimo/tck/branches/3.0/geronimo-porting/src/main/java/org/apache/geronimo/test/tck/ContextsImpl.java

Modified: geronimo/tck/branches/3.0/geronimo-porting/src/main/java/org/apache/geronimo/test/tck/ContextsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/tck/branches/3.0/geronimo-porting/src/main/java/org/apache/geronimo/test/tck/ContextsImpl.java?rev=1056764&r1=1056763&r2=1056764&view=diff
==============================================================================
--- geronimo/tck/branches/3.0/geronimo-porting/src/main/java/org/apache/geronimo/test/tck/ContextsImpl.java (original)
+++ geronimo/tck/branches/3.0/geronimo-porting/src/main/java/org/apache/geronimo/test/tck/ContextsImpl.java Sat Jan  8 18:58:46 2011
@@ -20,6 +20,7 @@ package org.apache.geronimo.test.tck;
 
 import javax.enterprise.context.RequestScoped;
 
+import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.context.AbstractContext;
 import org.apache.webbeans.context.ContextFactory;
 import org.apache.webbeans.context.RequestContext;
@@ -30,13 +31,14 @@ public class ContextsImpl implements Con
 
     public AbstractContext getRequestContext() {
         System.out.println("getRequestContext");
-        RequestContext ctx = (RequestContext) ContextFactory.getStandardContext(RequestScoped.class);
+        ContextFactory contextFactory = WebBeansContext.getInstance().getContextFactory();
+        RequestContext ctx = (RequestContext) contextFactory.getStandardContext(RequestScoped.class);
 
         if (ctx == null) {
-            ContextFactory.initRequestContext(null);
+            contextFactory.initRequestContext(null);
         }
 
-        return (AbstractContext) ContextFactory.getStandardContext(ContextTypes.REQUEST);
+        return (AbstractContext) contextFactory.getStandardContext(ContextTypes.REQUEST);
     }
 
     public void setActive(AbstractContext context) {
@@ -51,7 +53,8 @@ public class ContextsImpl implements Con
 
     public AbstractContext getDependentContext() {
         System.out.println("getDependentContext");
-        return (AbstractContext) ContextFactory.getStandardContext(ContextTypes.DEPENDENT);
+        ContextFactory contextFactory = WebBeansContext.getInstance().getContextFactory();
+        return (AbstractContext) contextFactory.getStandardContext(ContextTypes.DEPENDENT);
     }
 
     public void destroyContext(AbstractContext context) {