tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andygumbre...@apache.org
Subject [74/77] [abbrv] tomee git commit: skipping UseAppClassLoader resources merging with tomcat resources
Date Tue, 01 Dec 2015 22:04:26 GMT
skipping UseAppClassLoader resources merging with tomcat resources


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

Branch: refs/heads/tomee-7.0.0-M1
Commit: dfe79c4f4a0bcb3379e6c8c4298343eb28f8d7b6
Parents: 4deaec5
Author: Romain Manni-Bucau <rmannibu@gmail.com>
Authored: Tue Dec 1 21:43:04 2015 +0100
Committer: Romain Manni-Bucau <rmannibu@gmail.com>
Committed: Tue Dec 1 21:43:04 2015 +0100

----------------------------------------------------------------------
 .../apache/openejb/core/ivm/naming/LazyObjectReference.java  | 8 +++++++-
 .../java/org/apache/tomee/catalina/TomcatJndiBuilder.java    | 3 ++-
 2 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/dfe79c4f/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/naming/LazyObjectReference.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/naming/LazyObjectReference.java
b/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/naming/LazyObjectReference.java
index 37aa6ee..80ab060 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/naming/LazyObjectReference.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/core/ivm/naming/LazyObjectReference.java
@@ -36,7 +36,7 @@ public class LazyObjectReference<T> extends Reference {
                     try {
                         instance = creator.call();
                     } catch (final Exception e) {
-                        throw new NamingException(e.getMessage());
+                        throw new LazyNamingException(e.getMessage());
                     }
                 }
             }
@@ -47,4 +47,10 @@ public class LazyObjectReference<T> extends Reference {
     public boolean isInitialized() {
         return instance != null;
     }
+
+    public static class LazyNamingException extends NamingException {
+        private LazyNamingException(final String message) {
+            super(message);
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/tomee/blob/dfe79c4f/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatJndiBuilder.java
----------------------------------------------------------------------
diff --git a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatJndiBuilder.java
b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatJndiBuilder.java
index 35b8adb..b63b22b 100644
--- a/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatJndiBuilder.java
+++ b/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatJndiBuilder.java
@@ -880,7 +880,8 @@ public class TomcatJndiBuilder {
 
         for (final ResourceInfo info : resources) {
             final String name = info.id;
-            if (name == null || naming.findResource(name) != null) {
+            // if invalid or existing or lazy just skip it cause doesnt work during startup
+            if (name == null || naming.findResource(name) != null || info.properties.containsKey("UseAppClassLoader"))
{
                 continue;
             }
 


Mime
View raw message