Author: struberg
Date: Sat Aug  4 08:45:50 2012
New Revision: 1369286

URL: http://svn.apache.org/viewvc?rev=1369286&view=rev
Log:
OWB-690 for our CdiTest we disable any caching in our proxies

This should remove side effects when running unit tests in 
web applications where openwebbeans-web automatically enables the
RequestScopedBeanInterceptorHandler.

Modified:
    
openwebbeans/trunk/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
    
openwebbeans/trunk/webbeans-test/cditest-owb/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
    
openwebbeans/trunk/webbeans-test/cditest-owb/src/test/java/org/apache/webbeans/cditest/test/TestOwbTestContainer.java

Modified: 
openwebbeans/trunk/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
URL: 
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans.properties?rev=1369286&r1=1369285&r2=1369286&view=diff
==============================================================================
--- 
openwebbeans/trunk/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
 (original)
+++ 
openwebbeans/trunk/webbeans-impl/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
 Sat Aug  4 08:45:50 2012
@@ -115,7 +115,7 @@ org.apache.webbeans.useBDABeansXMLScanne
 org.apache.webbeans.javassist.useClassLoaderProvider=false
 
################################################################################################
 
-########################### Proxy Implmenentation Mapping 
######################################
+########################### Proxy Implementation Mapping 
######################################
 # This allows mapping a Scope Annotation class to a specific InterceptorProxy 
which are
 # typically sub classes of NormalScopedBeanInterceptorHandler
 #

Modified: 
openwebbeans/trunk/webbeans-test/cditest-owb/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
URL: 
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-test/cditest-owb/src/main/resources/META-INF/openwebbeans/openwebbeans.properties?rev=1369286&r1=1369285&r2=1369286&view=diff
==============================================================================
--- 
openwebbeans/trunk/webbeans-test/cditest-owb/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
 (original)
+++ 
openwebbeans/trunk/webbeans-test/cditest-owb/src/main/resources/META-INF/openwebbeans/openwebbeans.properties
 Sat Aug  4 08:45:50 2012
@@ -15,7 +15,7 @@
 #specific language governing permissions and limitations
 #under the License.
 
-# this is the test configuration, thus it has anordinal between the plugins 
and the application
+# this is the test configuration, thus it has an ordinal between the plugins 
and the application
 configuration.ordinal=60
 
 # use non-JTA resource injection
@@ -27,3 +27,7 @@ org.apache.webbeans.spi.ContainerLifecyc
 # we force the default implementation of 
org.apache.webbeans.corespi.ContextsService.
 # because picking up e.g. the WebContextsService would make unit tests stop 
working
 
org.apache.webbeans.spi.ContextsService=org.apache.webbeans.corespi.se.DefaultContextsService
+
+# To avoid any contextual instance caching issues, we also reset the 
configured proxies
+org.apache.webbeans.proxy.mapping.javax.enterprise.context.RequestScoped=org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler
+org.apache.webbeans.proxy.mapping.javax.enterprise.context.ApplicationScoped=org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler

Modified: 
openwebbeans/trunk/webbeans-test/cditest-owb/src/test/java/org/apache/webbeans/cditest/test/TestOwbTestContainer.java
URL: 
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-test/cditest-owb/src/test/java/org/apache/webbeans/cditest/test/TestOwbTestContainer.java?rev=1369286&r1=1369285&r2=1369286&view=diff
==============================================================================
--- 
openwebbeans/trunk/webbeans-test/cditest-owb/src/test/java/org/apache/webbeans/cditest/test/TestOwbTestContainer.java
 (original)
+++ 
openwebbeans/trunk/webbeans-test/cditest-owb/src/test/java/org/apache/webbeans/cditest/test/TestOwbTestContainer.java
 Sat Aug  4 08:45:50 2012
@@ -34,6 +34,7 @@ public class TestOwbTestContainer extend
     {
         CdiTestContainer cdi = CdiTestContainerLoader.getCdiContainer();
         cdi.bootContainer();
+        cdi.startContexts();
 
         assertAll(cdi, 0);
 


Reply via email to