Uploaded image for project: 'FUSE Mediation Router'
  1. FUSE Mediation Router
  2. MR-690

overriding blueprint placeholders when using CamelBlueprintTestSupport/pojosr framework

    XMLWordPrintable

Details

    Description

      This is an improvement to org.apache.camel.test.blueprint.CamelBlueprintTestSupport

      The CamelBlueprintTestSupport is using the pojosr framework to emulate the OSGi Framework.
      When the blueprint.xml contains placeholders (placeholders that are NOT within the camel context) that need to be overwritten for the unit test, see ${brokerUrl}below, there does not appear to be a straightforward approach/mechanism to override these properties.

      <cm:property-placeholder persistent-id="com.acme">
          <cm:default-properties>
            <cm:property name="brokerUrl" value="tcp://myhost:61616"/>
            <cm:property name="prop2" value="prop2_value"/>
          </cm:default-properties>
        </cm:property-placeholder>
       
        <bean class="org.apache.activemq.camel.component.ActiveMQComponent" id="activemq">
          <property name="brokerURL" value="${brokerUrl}"/>
          <property name="preserveMessageQos" value="true"/>
        </bean>
        
         <camelContext xmlns="http://camel.apache.org/schema/blueprint" trace="true">
          <route id="myRoute">
              <from uri="activemq:queue:{{prop2_value}}"/>
              <to uri="file:{{prop2_value}}"/>
          </route>
          
        </camelContext>
      

      There appears to be an overriding mechanism available if the placeholders are located within the camel context but not for property placeholders outside the camel content.

      Attachments

        Activity

          People

            cibsen@redhat.com Claus Ibsen
            rhn-support-pfox Patrick Fox (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: