CAMEL-8786 Fixed the issue of CamelServletContextListener servletContext init 
parameters check


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

Branch: refs/heads/camel-2.15.x
Commit: 573b373539fdc4e1ce6c1c4862ffc27adf45a1aa
Parents: f4bd134
Author: Willem Jiang <willem.ji...@gmail.com>
Authored: Thu May 21 15:03:22 2015 +0800
Committer: Willem Jiang <willem.ji...@gmail.com>
Committed: Thu May 21 15:10:36 2015 +0800

----------------------------------------------------------------------
 .../servletlistener/CamelServletContextListener.java     | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/573b3735/components/camel-servletlistener/src/main/java/org/apache/camel/component/servletlistener/CamelServletContextListener.java
----------------------------------------------------------------------
diff --git 
a/components/camel-servletlistener/src/main/java/org/apache/camel/component/servletlistener/CamelServletContextListener.java
 
b/components/camel-servletlistener/src/main/java/org/apache/camel/component/servletlistener/CamelServletContextListener.java
index efe1fdd..cb99d9f 100644
--- 
a/components/camel-servletlistener/src/main/java/org/apache/camel/component/servletlistener/CamelServletContextListener.java
+++ 
b/components/camel-servletlistener/src/main/java/org/apache/camel/component/servletlistener/CamelServletContextListener.java
@@ -119,11 +119,7 @@ public abstract class CamelServletContextListener<R 
extends Registry> implements
                 throw new RuntimeException("Error creating 
CamelContextLifecycle class with name " + lifecycle, e);
             }
         }
-        // just log if we could not use all the parameters, as they may be 
used by others
-        if (!map.isEmpty()) {
-            LOG.info("There are {} ServletContext init parameters, unknown to 
Camel. Maybe they are used by other frameworks? [{}]", map.size(), map);
-        }
-
+        
         try {
             if (camelContextLifecycle != null) {
                 camelContextLifecycle.beforeAddRoutes(camelContext, registry);
@@ -167,6 +163,11 @@ public abstract class CamelServletContextListener<R 
extends Registry> implements
                 throw new IllegalArgumentException("Unsupported route: " + 
route);
             }
         }
+        
+        // just log if we could not use all the parameters, as they may be 
used by others
+        if (!map.isEmpty()) {
+            LOG.info("There are {} ServletContext init parameters, unknown to 
Camel. Maybe they are used by other frameworks? [{}]", map.size(), map);
+        }
 
         try {
             if (camelContextLifecycle != null) {

Reply via email to