You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by rm...@apache.org on 2012/04/15 17:13:59 UTC

svn commit: r1326359 - /openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/FinderFactory.java

Author: rmannibucau
Date: Sun Apr 15 15:13:59 2012
New Revision: 1326359

URL: http://svn.apache.org/viewvc?rev=1326359&view=rev
Log:
always link the webapp annotation finder to be sure to be able to filter by module using getannotatedclasses

Modified:
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/FinderFactory.java

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/FinderFactory.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/FinderFactory.java?rev=1326359&r1=1326358&r2=1326359&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/FinderFactory.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/FinderFactory.java Sun Apr 15 15:13:59 2012
@@ -53,8 +53,11 @@ public class FinderFactory {
         if (module instanceof WebModule) {
             WebModule webModule = (WebModule) module;
             AnnotationFinder annotationFinder = new AnnotationFinder(new WebappAggregatedArchive(webModule, webModule.getScannableUrls()));
-            if (annotationFinder.hasMetaAnnotations()) annotationFinder = annotationFinder.link();
-            finder = annotationFinder;
+
+            // always link otherwise the ModuleLimitedFinder will not be able to use getAnnotatedClassNames() method
+            // and result will always be empty
+            // if (annotationFinder.hasMetaAnnotations())
+            finder = annotationFinder.link();
         } else if (module instanceof ConnectorModule) {
         	ConnectorModule connectorModule = (ConnectorModule) module;
         	finder = new AnnotationFinder(new ConfigurableClasspathArchive(connectorModule, connectorModule.getLibraries())).link();