Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-4214

Cache in BundleResources works only for a single metatype properties file per bundle

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • metatype-1.0.6
    • metatype-1.0.8
    • Metatype Service
    • None

    Description

      In some cases, the static cache in BundleResources is not updated correctly when a bundle is updated. It seems this is especially a problem, if there is more than one resource file for metatype information. In my case I experienced the problem with the following setup:
      I'm using the scr plugin to generate the metatype information and this generates an xml for each metadata with a localization attribute set to the base of a custom properties file containing i18n translations, so something like localization=OSGI-INF/metatype/myservice
      And I have a properties file at OSGI-INF/metatype/myservice.properties

      In most cases, it seems this properties file is not found/read - however, after N updates of my bundle containing this, it starts to work and the properties file is picked up. Restarting the framework makes it fail again, until another couple of bundle updates.
      If the default file OSGI-INF/metatype/metatype is specified in the localization field, this file (metatype.properties) is always picked up.

      Disabling the static cache resourcesByBundle in BundleResources solves the problem

      Attachments

        Issue Links

          Activity

            People

              cziegeler Carsten Ziegeler
              cziegeler Carsten Ziegeler
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: