tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject [12/50] tomee git commit: AddContainerCdiBeansExtension for wars as well
Date Wed, 11 Mar 2015 11:56:28 GMT
AddContainerCdiBeansExtension for wars as well


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/5583c703
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/5583c703
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/5583c703

Branch: refs/heads/master
Commit: 5583c7037a4a115d8ffd7dbe03331fa51749cced
Parents: 5a22afa
Author: Romain Manni-Bucau <rmannibucau@apache.org>
Authored: Thu Mar 5 10:02:32 2015 +0100
Committer: Romain Manni-Bucau <rmannibucau@apache.org>
Committed: Thu Mar 5 10:02:32 2015 +0100

----------------------------------------------------------------------
 .../cdi/embedded/AddContainerCdiBeansExtension.java   | 14 ++++++++++++++
 tck/cdi-embedded/src/test/resources/failing.xml       |  2 +-
 2 files changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/5583c703/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/AddContainerCdiBeansExtension.java
----------------------------------------------------------------------
diff --git a/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/AddContainerCdiBeansExtension.java
b/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/AddContainerCdiBeansExtension.java
index 49e4053..a5b0cb4 100644
--- a/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/AddContainerCdiBeansExtension.java
+++ b/tck/cdi-embedded/src/test/java/org/apache/openejb/tck/cdi/embedded/AddContainerCdiBeansExtension.java
@@ -18,6 +18,7 @@ package org.apache.openejb.tck.cdi.embedded;
 
 import org.apache.openejb.cdi.CompositeBeans;
 import org.apache.openejb.config.EjbModule;
+import org.apache.openejb.config.WebModule;
 import org.apache.openejb.config.event.BeforeAppInfoBuilderEvent;
 import org.apache.openejb.jee.Beans;
 import org.apache.openejb.observer.Observes;
@@ -45,5 +46,18 @@ public class AddContainerCdiBeansExtension {
                 return;
             }
         }
+        // else a war
+        for (final WebModule webModule : event.getAppModule().getWebModules()) {
+            for (final EjbModule ejbModule : event.getAppModule().getEjbModules()) {
+                if (ejbModule.getModuleId().equals(webModule.getModuleId())) {
+                    final Beans beans = ejbModule.getBeans();
+                    if (CompositeBeans.class.isInstance(beans)) {
+                        final CompositeBeans cb = CompositeBeans.class.cast(beans);
+                        cb.getManagedClasses().put(EXT_LIB, new ArrayList<>(BEANS));
+                    }
+                    return;
+                }
+            }
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/5583c703/tck/cdi-embedded/src/test/resources/failing.xml
----------------------------------------------------------------------
diff --git a/tck/cdi-embedded/src/test/resources/failing.xml b/tck/cdi-embedded/src/test/resources/failing.xml
index da64e41..6b86fa7 100644
--- a/tck/cdi-embedded/src/test/resources/failing.xml
+++ b/tck/cdi-embedded/src/test/resources/failing.xml
@@ -31,7 +31,7 @@
     -Dopenejb.embedded.try-jsp=true
     -->
     <classes>
-      <class name="org.jboss.cdi.tck.tests.lookup.injectionpoint.non.contextual.NonContextualInjectionPointTest"
/>
+      <class name="org.jboss.cdi.tck.tests.extensions.beanManager.unmanaged.UnmanagedInstanceTest"
/>
     </classes>
   </test>
 </suite>


Mime
View raw message