openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1850340 - /openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/cdi/MeecrowaveSeContainerInitializer.java
Date Fri, 04 Jan 2019 09:59:03 GMT
Author: rmannibucau
Date: Fri Jan  4 09:59:03 2019
New Revision: 1850340

URL: http://svn.apache.org/viewvc?rev=1850340&view=rev
Log:
MEECROWAVE-169 force WebContextsService in case the user didnt set a contextsservice with
CDI SE API

Modified:
    openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/cdi/MeecrowaveSeContainerInitializer.java

Modified: openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/cdi/MeecrowaveSeContainerInitializer.java
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/cdi/MeecrowaveSeContainerInitializer.java?rev=1850340&r1=1850339&r2=1850340&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/cdi/MeecrowaveSeContainerInitializer.java
(original)
+++ openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/cdi/MeecrowaveSeContainerInitializer.java
Fri Jan  4 09:59:03 2019
@@ -27,7 +27,9 @@ import org.apache.meecrowave.openwebbean
 import org.apache.openwebbeans.se.OWBContainer;
 import org.apache.openwebbeans.se.OWBInitializer;
 import org.apache.webbeans.config.WebBeansContext;
+import org.apache.webbeans.spi.ContextsService;
 import org.apache.webbeans.spi.ScannerService;
+import org.apache.webbeans.web.context.WebContextsService;
 import org.apache.xbean.finder.filter.Filter;
 
 import javax.enterprise.inject.se.SeContainer;
@@ -117,6 +119,9 @@ public class MeecrowaveSeContainerInitia
     @Override
     protected SeContainer newContainer(final WebBeansContext context) {
         final Meecrowave meecrowave = new Meecrowave(builder);
+        if (!services.containsKey(ContextsService.class.getName())) { // forced otherwise
we mess up the env with owb-se
+            context.registerService(ContextsService.class, new WebContextsService(context));
+        }
         return new OWBContainer(context, meecrowave) {
             {
                 meecrowave.bake();



Mime
View raw message