camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/5] git commit: CAMEL-6699: Fixed using <routeBuilder ref> in OSGi Blueprint.
Date Mon, 02 Sep 2013 15:41:58 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/eed23e3e
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/eed23e3e
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/eed23e3e

Branch: refs/heads/master
Commit: eed23e3e8abe98c5d939badb951cda8ebbe6d51d
Parents: b23317f
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:40:31 2013 +0200

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


http://git-wip-us.apache.org/repos/asf/camel/blob/eed23e3e/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 8e0b498..621d645 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
@@ -721,21 +721,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