Kevin Earls created CAMEL-9901:
----------------------------------

             Summary: CameBlueprintTest support doesn't update values in routes 
if placeholders are used
                 Key: CAMEL-9901
                 URL: https://issues.apache.org/jira/browse/CAMEL-9901
             Project: Camel
          Issue Type: Improvement
          Components: camel-test
            Reporter: Kevin Earls
            Priority: Minor


If you specify placeholder-prefix and placeholder-suffix in a blueprint 
property-placeholder, properties are overridden correctly in beans, but not in 
routes.  For example, if you apply the changes below to 
https://github.com/apache/camel/blob/master/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-loadfileoverride.xml
 and run ConfigAdminLoadConfigurationFileAndOverrideTest it will fail because 
it can't substitute for "[destination]".  If you leave the uris in the route 
set to "{{destination}}" the test will pass.

  <!-- blueprint property placeholders, that will use etc/stuff.cfg as the 
properties file -->
-  <cm:property-placeholder persistent-id="stuff" update-strategy="reload">
+  <cm:property-placeholder persistent-id="stuff" update-strategy="reload" 
placeholder-prefix="[" placeholder-suffix="]">
     <cm:default-properties>
       <cm:property name="greeting" value="Hello" />
       <cm:property name="echo" value="Hey" />
@@ -34,8 +34,8 @@
 
   <!-- a bean that uses a blueprint property placeholder -->
   <bean id="myCoolBean" class="org.apache.camel.test.blueprint.MyCoolBean">
-    <property name="say" value="${greeting}"/>
-    <property name="echo" value="${echo}"/>
+    <property name="say" value="[greeting]"/>
+    <property name="echo" value="[echo]"/>
   </bean>
 
   <camelContext xmlns="http://camel.apache.org/schema/blueprint";>
@@ -43,9 +43,9 @@
     <route>
       <from uri="direct:start"/>
       <bean ref="myCoolBean" method="saySomething"/>
-      <to uri="{{destination}}"/>
+      <to uri="[destination]"/>
       <bean ref="myCoolBean" method="echoSomething"/>
-      <to uri="{{destination}}"/>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to