tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject [2/2] tomee git commit: supporting JspTag as EE component + using InjectableBeanManager and not BeanManagerImpl for injections
Date Thu, 05 Mar 2015 19:42:51 GMT
supporting JspTag as EE component + using InjectableBeanManager and not BeanManagerImpl for
injections


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

Branch: refs/heads/develop
Commit: ee3786ce1d0d744fa3c5a5efc3270a357f25f620
Parents: 9eebf36
Author: Romain Manni-Bucau <rmannibucau@apache.org>
Authored: Thu Mar 5 20:40:00 2015 +0100
Committer: Romain Manni-Bucau <rmannibucau@apache.org>
Committed: Thu Mar 5 20:42:41 2015 +0100

----------------------------------------------------------------------
 .../assembler/classic/JndiEncBuilder.java       | 28 ++++++++++----------
 .../java/org/apache/openejb/cdi/CdiPlugin.java  |  6 ++++-
 tck/cdi-embedded/src/test/resources/failing.xml |  4 +--
 tck/cdi-embedded/src/test/resources/passing.xml |  1 +
 4 files changed, 22 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/ee3786ce/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncBuilder.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncBuilder.java
b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncBuilder.java
index 89ba559..ab1142c 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncBuilder.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncBuilder.java
@@ -50,8 +50,21 @@ import org.apache.openejb.util.IntrospectionSupport;
 import org.apache.openejb.util.LogCategory;
 import org.apache.openejb.util.Logger;
 import org.apache.webbeans.config.WebBeansContext;
+import org.apache.webbeans.container.InjectableBeanManager;
 import org.omg.CORBA.ORB;
 
+import java.io.Serializable;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.TreeMap;
+import java.util.concurrent.Callable;
 import javax.annotation.ManagedBean;
 import javax.ejb.EJBContext;
 import javax.ejb.TimerService;
@@ -81,18 +94,6 @@ import javax.ws.rs.ext.ContextResolver;
 import javax.ws.rs.ext.Providers;
 import javax.xml.ws.Service;
 import javax.xml.ws.WebServiceContext;
-import java.io.Serializable;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.TreeMap;
-import java.util.concurrent.Callable;
 
 /**
  * TODO: This class is essentially an over glorified sym-linker.  The names we were linking
to are no longer guaranteed to be what we assume them to be.  We need to come up with a
@@ -380,12 +381,11 @@ public class JndiEncBuilder {
                 final String jndiName = "comp/TimerService";
                 reference = new LinkRef(jndiName);
 
-                // TODO Bind the BeanManager
             } else if (BeanManager.class.equals(type)) {
                 reference = new LazyObjectReference<BeanManager>(new Callable<BeanManager>()
{
                     @Override
                     public BeanManager call() throws Exception {
-                        return WebBeansContext.currentInstance().getBeanManagerImpl();
+                        return new InjectableBeanManager(WebBeansContext.currentInstance().getBeanManagerImpl());
                     }
                 });
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/ee3786ce/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java b/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java
index 4344137..ab94535 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiPlugin.java
@@ -74,6 +74,7 @@ import javax.inject.Provider;
 import javax.servlet.Filter;
 import javax.servlet.Servlet;
 import javax.servlet.ServletContextListener;
+import javax.servlet.jsp.tagext.JspTag;
 import java.io.Serializable;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.InvocationHandler;
@@ -118,7 +119,10 @@ public class CdiPlugin extends AbstractOwbPlugin implements OpenWebBeansJavaEEPl
 
     @Override
     public boolean isEEComponent(final Class<?> impl) {
-        return Servlet.class.isAssignableFrom(impl) || Filter.class.isAssignableFrom(impl)
|| ServletContextListener.class.isAssignableFrom(impl);
+        return Servlet.class.isAssignableFrom(impl)
+                || Filter.class.isAssignableFrom(impl)
+                || ServletContextListener.class.isAssignableFrom(impl)
+                || JspTag.class.isAssignableFrom(impl);
     }
 
     public void setClassLoader(final ClassLoader classLoader) {

http://git-wip-us.apache.org/repos/asf/tomee/blob/ee3786ce/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 dd71410..a215086 100644
--- a/tck/cdi-embedded/src/test/resources/failing.xml
+++ b/tck/cdi-embedded/src/test/resources/failing.xml
@@ -30,8 +30,8 @@
     -Dopenejb.http.mock-request=true
     -Dopenejb.embedded.try-jsp=true
     -->
-    <classes>
-      <class name="org.jboss.cdi.tck.tests.context.conversation.ClientConversationContextTest"
/>
+    <classes><!-- org.jboss.cdi.tck.tests.extensions.producer.remote.RemoteProducerTest
-->
+      <class name="org.jboss.cdi.tck.tests.extensions.processBean.ProcessBeanTest" />
     </classes>
   </test>
 </suite>

http://git-wip-us.apache.org/repos/asf/tomee/blob/ee3786ce/tck/cdi-embedded/src/test/resources/passing.xml
----------------------------------------------------------------------
diff --git a/tck/cdi-embedded/src/test/resources/passing.xml b/tck/cdi-embedded/src/test/resources/passing.xml
index 89debb3..4f29ed7 100644
--- a/tck/cdi-embedded/src/test/resources/passing.xml
+++ b/tck/cdi-embedded/src/test/resources/passing.xml
@@ -48,6 +48,7 @@
     <listener class-name="org.testng.reporters.XMLReporter"/>
     <listener class-name="org.testng.reporters.EmailableReporter"/>
     <listener class-name="org.apache.openejb.tck.cdi.embedded.HTMLReporter"/>
+    <listener class-name="org.apache.openejb.tck.cdi.embedded.StandaloneTckCleaner"/>
   </listeners>
 
   <test name="JSR-346 TCK">


Mime
View raw message