Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-593

When deploying a new feature config files are not installed before bundles are started.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • M1, jboss-fuse-6.2
    • fuse-esb-7.1.0
    • None
    • None
    • % %

    Description

      Suppose we have a feature file like:

      <?xml version="1.0" encoding="UTF-8"?>
      <features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0">\
              <feature name="test-config" version="1.0.0" resolver="(obr)">
                      <configfile finalname="/etc/test_properties.cfg">mvn:test/config-test/1.0.0-SNAPSHOT/cfg</configfile>
                      <bundle>mvn:test/config-test/1.0.0-SNAPSHOT</bundle>
              </feature>
      </features>
      
      

      Where my bundle is a very simple route that picks up a value from the configuration file:

      <cm:property-placeholder persistent-id="test_properties" />
      
              <bean id="exception" class="java.lang.Exception">
                      <argument value="${text}" />
              </bean>
      
              <camelContext xmlns="http://camel.apache.org/schema/blueprint">
              <route>
                  <from uri="timer:blah" />
                  <throwException ref="exception" />
              </route>
          </camelContext>
      

      When you start this bundle, the file gets created ok, however, the bundle is already started and has not read it:

      16:51:18,061 | ERROR | 4 - timer://blah | DefaultErrorHandler              | 147 - org.apache.camel.camel-core - 2.10.0.fuse-71-047 | Failed delivery for (MessageId: ID-wildflower-59341-1361567870710-8-167 on ExchangeId: ID-wildflower-59341-1361567870710-8-168). Exhausted after delivery attempt: 1 caught: java.lang.Exception: ${text}
      java.lang.Exception: ${text}
      

      Which is not what we wanted.

      I think that KARAF-888 may address this.

      In the meantime, we can work around it by having the feature file contain two features, one for the config file and the other for feature. We then install them in order:

      FuseESB:karaf@root> features:addurl file:/Users/sjavurek/Fuse/Enterprise/7.1/fuse-esb-7.1.0.fuse-047/nfeat.xml
      FuseESB:karaf@root> features:install test-config-file
      FuseESB:karaf@root> features:install test-config

      Attachments

        1. feat.xml
          0.3 kB
        2. newtc.zip
          5 kB

        Activity

          People

            janstey@redhat.com Jonathan Anstey
            rhn-support-sjavurek Susan Javurek
            Lukas Lowinger Lukas Lowinger
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: