Repository: camel Updated Branches: refs/heads/master 98ccff721 -> 50476075b
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/50476075 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/50476075 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/50476075 Branch: refs/heads/master Commit: 50476075bd35a5639174620a410d9e9ae3009060 Parents: 98ccff7 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:09:52 2015 +0800 ---------------------------------------------------------------------- .../servletlistener/CamelServletContextListener.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/50476075/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) {