camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r757329 - /camel/branches/camel-1.x/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
Date Mon, 23 Mar 2009 06:53:01 GMT
Author: davsclaus
Date: Mon Mar 23 06:53:01 2009
New Revision: 757329

URL: http://svn.apache.org/viewvc?rev=757329&view=rev
Log:
CAMEL-1477: Fixed routeBuilderRef in Spring DSL not working with injected endpoints.

Modified:
    camel/branches/camel-1.x/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java

Modified: camel/branches/camel-1.x/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java?rev=757329&r1=757328&r2=757329&view=diff
==============================================================================
--- camel/branches/camel-1.x/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
(original)
+++ camel/branches/camel-1.x/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
Mon Mar 23 06:53:01 2009
@@ -532,6 +532,10 @@
             Map builders = getApplicationContext().getBeansOfType(RouteBuilder.class, true,
true);
             if (builders != null) {
                 for (Object builder : builders.values()) {
+                    if (beanPostProcessor != null) {
+                        // Inject the annotated resource
+                        beanPostProcessor.postProcessBeforeInitialization(builder, builder.toString());
+                    }
                     getContext().addRoutes((RouteBuilder) builder);
                 }
             }
@@ -540,6 +544,10 @@
             getContext().addRoutes(routeBuilder);
         }
         if (routeBuilder != null) {
+            if (beanPostProcessor != null) {
+                // Inject the annotated resource
+                beanPostProcessor.postProcessBeforeInitialization(routeBuilder, routeBuilder.toString());
+            }
             getContext().addRoutes(routeBuilder);
         }
 
@@ -547,6 +555,10 @@
         if (builderRefs != null) {
             for (RouteBuilderRef builderRef : builderRefs) {
                 RouteBuilder builder = builderRef.createRouteBuilder(getContext());
+                if (beanPostProcessor != null) {
+                    // Inject the annotated resource
+                    beanPostProcessor.postProcessBeforeInitialization(builder, builder.toString());
+                }
                 getContext().addRoutes(builder);
             }
         }



Mime
View raw message