Hi everyone:
I am using Blueprint property placeholders on Karaf 3.0.4/ServiceMix
6.0.0 to configure my bundles as follows:
blueprint/blueprint.xml:
[...]
<cm:property-placeholder id="config-test-blueprint-placeholder"
persistent-id="test.config" update-strategy="reload">
<cm:default-properties>
<cm:property name="test.property.1" value="Test 1" />
</cm:default-properties>
</cm:property-placeholder>
[...]
I also provide configuration files in $KARAF_HOME/etc with matching properties:
etc/test.config.cfg:
[...]
test.property.1 = Test Value 1
[...]
When I apply configuration changes in the system console, all property
updates are synchronized with the configuration files, which is
expected.
As soon as I add Metatype information to my bundles, the
synchronization mechanism stops working, i.e. the changes are
reflected in OSGi ConfigAdmin, but not written back to the
configuration files. I eventually found out that I have to add the
following attribute definition in my Metatype file in order for the
synchronization to work:
metatype/metatype.xml:
[...]
<AD name="felix.fileinstall.filename" id="felix.fileinstall.filename"
required="true" type="String" default="" description="" />
[...]
Is this the right approach or should file synchronization work without
any explicit attribute definition for "felix.fileinstall.filename"?
Thanks in advance,
Gregor