openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r907431 - /openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/ContextsImpl.java
Date Sun, 07 Feb 2010 15:15:37 GMT
Author: gerdogdu
Date: Sun Feb  7 15:15:37 2010
New Revision: 907431

URL: http://svn.apache.org/viewvc?rev=907431&view=rev
Log:
Update while running TCK

Modified:
    openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/ContextsImpl.java

Modified: openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/ContextsImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/ContextsImpl.java?rev=907431&r1=907430&r2=907431&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/ContextsImpl.java
(original)
+++ openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/ContextsImpl.java
Sun Feb  7 15:15:37 2010
@@ -13,8 +13,11 @@
  */
 package org.apache.webbeans.test.tck;
 
+import javax.enterprise.context.RequestScoped;
+
 import org.apache.webbeans.context.AbstractContext;
 import org.apache.webbeans.context.ContextFactory;
+import org.apache.webbeans.context.RequestContext;
 import org.apache.webbeans.context.type.ContextTypes;
 import org.jboss.jsr299.tck.spi.Contexts;
 
@@ -23,7 +26,13 @@
 
     public AbstractContext getRequestContext()
     {
-        ContextFactory.initRequestContext(null);
+        RequestContext ctx =  (RequestContext)ContextFactory.getStandardContext(RequestScoped.class);
+        
+        if(ctx == null)
+        {
+            ContextFactory.initRequestContext(null);   
+        }
+        
         return (AbstractContext) ContextFactory.getStandartContext(ContextTypes.REQUEST);
     }
 



Mime
View raw message