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