geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r1149005 - /geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans-builder/src/main/java/org/apache/geronimo/openwebbeans/deployment/OpenWebBeansModuleBuilderExtension.java
Date Thu, 21 Jul 2011 02:02:31 GMT
Author: dblevins
Date: Thu Jul 21 02:02:31 2011
New Revision: 1149005

URL: http://svn.apache.org/viewvc?rev=1149005&view=rev
Log:
GERONIMO-6090:  Don't scan for EE Injections in a CDI application in metadata complete web
module

Modified:
    geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans-builder/src/main/java/org/apache/geronimo/openwebbeans/deployment/OpenWebBeansModuleBuilderExtension.java

Modified: geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans-builder/src/main/java/org/apache/geronimo/openwebbeans/deployment/OpenWebBeansModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans-builder/src/main/java/org/apache/geronimo/openwebbeans/deployment/OpenWebBeansModuleBuilderExtension.java?rev=1149005&r1=1149004&r2=1149005&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans-builder/src/main/java/org/apache/geronimo/openwebbeans/deployment/OpenWebBeansModuleBuilderExtension.java
(original)
+++ geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans-builder/src/main/java/org/apache/geronimo/openwebbeans/deployment/OpenWebBeansModuleBuilderExtension.java
Thu Jul 21 02:02:31 2011
@@ -22,6 +22,7 @@ import java.lang.reflect.Member;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
@@ -191,6 +192,17 @@ public class OpenWebBeansModuleBuilderEx
     }
 
     private List<Class<?>> getManagedClasses(WebApp webApp, WebModule webModule)
throws DeploymentException {
+
+        // Technically a CDI jar can never be meta-data complete
+        // But without this check we fail some EE TCK tests
+
+        // It would seem we are scanning too much of the classpath in this method
+        // we should only be scanning the jars that contain beans.xml files
+        // Obviously, this conflicts with the Bundle concept somewhat
+
+        if (webApp.isMetadataComplete()) return Collections.EMPTY_LIST;
+
+
         Bundle bundle = webModule.getEarContext().getDeploymentBundle();
         ServiceReference reference = bundle.getBundleContext().getServiceReference(PackageAdmin.class.getName());
         try {



Mime
View raw message