openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1678050 - /openwebbeans/trunk/webbeans-porting/src/main/java/org/apache/webbeans/test/tck/ContextsImpl.java
Date Wed, 06 May 2015 17:53:19 GMT
Author: struberg
Date: Wed May  6 17:53:19 2015
New Revision: 1678050

URL: http://svn.apache.org/r1678050
Log:
our TCK Context SPI must use the internal ContextsService

If we use BeanManager#getContext() then we blow up with a ContextNotActiveException

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=1678050&r1=1678049&r2=1678050&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
Wed May  6 17:53:19 2015
@@ -34,15 +34,9 @@ public class ContextsImpl implements Con
     {
         WebBeansContext webBeansContext = WebBeansContext.getInstance();
 
-        RequestContext ctx =  (RequestContext)webBeansContext.getBeanManagerImpl().getContext(RequestScoped.class);
-        
-        if(ctx == null)
-        {
-            webBeansContext.getContextsService().startContext(RequestScoped.class, null);
-            ctx =  (RequestContext)webBeansContext.getBeanManagerImpl().getContext(RequestScoped.class);
-        }
-        
-        return ctx;
+        RequestContext currentContext = (RequestContext) webBeansContext.getContextsService().getCurrentContext(RequestScoped.class);
+
+        return currentContext;
     }
 
     @Override



Mime
View raw message