camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [4/5] git commit: CAMEL-6699: Fixed using <routeBuilder ref> in OSGi Blueprint.
Date Mon, 02 Sep 2013 15:42:00 GMT
CAMEL-6699: Fixed using <routeBuilder ref> in OSGi Blueprint.


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

Branch: refs/heads/camel-2.11.x
Commit: 42659f8e771ee3f6ac157ee0f24de0f8df8741c5
Parents: e2c1a40
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Mon Sep 2 17:40:31 2013 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon Sep 2 17:41:07 2013 +0200

----------------------------------------------------------------------
 .../core/xml/AbstractCamelContextFactoryBean.java  | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/42659f8e/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
----------------------------------------------------------------------
diff --git a/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
b/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
index c6e5bd3..20bae2f 100644
--- a/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
+++ b/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
@@ -634,21 +634,14 @@ public abstract class AbstractCamelContextFactoryBean<T extends ModelCamelContex
     protected void installRoutes() throws Exception {
         List<RouteBuilder> builders = new ArrayList<RouteBuilder>();
 
-        // lets add route builders added from references
+        // lets add RoutesBuilder's added from references
         if (getBuilderRefs() != null) {
             for (RouteBuilderDefinition builderRef : getBuilderRefs()) {
-                RouteBuilder builder = builderRef.createRouteBuilder(getContext());
-                if (builder != null) {
-                    builders.add(builder);
+                RoutesBuilder routes = builderRef.createRoutes(getContext());
+                if (routes != null) {
+                    this.builders.add(routes);
                 } else {
-                    // support to get the route here
-                    RoutesBuilder routes = builderRef.createRoutes(getContext());
-                    if (routes != null) {
-                        this.builders.add(routes);
-                    } else {
-                        // Throw the exception that we can't find any build here
-                        throw new CamelException("Cannot find any routes with this RouteBuilder
reference: " + builderRef);
-                    }
+                    throw new CamelException("Cannot find any routes with this RouteBuilder
reference: " + builderRef);
                 }
             }
         }


Mime
View raw message