osgiconfiguration-fileskarafblueprint

Karaf OSGI blueprint cm:property-placeholder dows not load from cfg file


my blueprint contains:

<cm:property-placeholder persistent-id="pool-service" update-strategy="reload">
    <cm:default-properties>
        <cm:property name="maxTotalPerKey" value="2" />
    </cm:default-properties>
</cm:property-placeholder>

I placed etc/pool-service.cfg containing maxTotalPerKey=3

when I deploy jar, it picks value 2. If I comment cm:default-properties, it fails with number format exception, so cfg is not read.

Is there anything I am missing (maven dependency, import, configuration,...)?

Thanks, Viktor


Solution

  • The configuration file cannot contain -. Change etc/PoolService.cfg file to use:

    persistent-id="PoolService"