Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-9901

CameBlueprintTest support doesn't update values in routes if placeholders are used

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Not A Problem
    • None
    • None
    • camel-test
    • None
    • Unknown

    Description

      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"/>

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            kearls Kevin Anthony Earls
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: