tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject [2/2] git commit: starting to support no beans.xml modules
Date Thu, 06 Nov 2014 10:31:57 GMT
starting to support no beans.xml modules


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

Branch: refs/heads/develop
Commit: 1d55b1f89abfb86b0d2ad913fb789ea3537a6970
Parents: fe4f645
Author: Romain Manni-Bucau <rmannibucau@apache.org>
Authored: Thu Nov 6 10:31:07 2014 +0000
Committer: Romain Manni-Bucau <rmannibucau@apache.org>
Committed: Thu Nov 6 10:31:07 2014 +0000

----------------------------------------------------------------------
 .../main/java/org/apache/openejb/cdi/CdiScanner.java    | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/1d55b1f8/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiScanner.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiScanner.java b/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiScanner.java
index 7f9c151..39cea68 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiScanner.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiScanner.java
@@ -29,6 +29,8 @@ import org.apache.openejb.cdi.transactional.RequiredInterceptor;
 import org.apache.openejb.cdi.transactional.RequiredNewInterceptor;
 import org.apache.openejb.cdi.transactional.SupportsInterceptor;
 import org.apache.openejb.loader.SystemInstance;
+import org.apache.openejb.util.LogCategory;
+import org.apache.openejb.util.Logger;
 import org.apache.openejb.util.PropertyPlaceHolderHelper;
 import org.apache.openejb.util.classloader.ClassLoaderComparator;
 import org.apache.openejb.util.classloader.DefaultClassLoaderComparator;
@@ -234,6 +236,16 @@ public class CdiScanner implements ScannerService {
         final boolean isNotEarWebApp = startupObject.getWebContext() == null;
 
         if (!noScan) {
+            if (scanModeAnnotated /* && bda.managedClasses.size() > 50 */) {
+                try {
+                    Logger.getInstance(LogCategory.OPENEJB, CdiScanner.class.getName())
+                            .info("No beans.xml in " + bda.uri.toASCIIString()
+                                    + " looking all classes to find CDI beans, maybe think
to add a beans.xml");
+                } catch (final Exception ex) {
+                    // no-op: not a big deal
+                }
+            }
+
             for (final String name : bda.managedClasses) {
                 if (information.isClassExcluded(name)) {
                     continue;


Mime
View raw message