felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregor Zurowski (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FELIX-5038) Configuration properties are not synchronized with config files when adding Metatype information
Date Thu, 17 Sep 2015 08:33:45 GMT
Gregor Zurowski created FELIX-5038:

             Summary: Configuration properties are not synchronized with config files when
adding Metatype information
                 Key: FELIX-5038
                 URL: https://issues.apache.org/jira/browse/FELIX-5038
             Project: Felix
          Issue Type: Bug
          Components: Configuration Admin
            Reporter: Gregor Zurowski
            Priority: Minor

In a Karaf/Blueprint setup, I noticed an issue related to Config Admin and Felix File Install
where configuration properties are not synchronized with the corresponding configuration file
once Metatype information is added to the bundle.

In a simple test bundle, the configuration properties are implemented using property placeholders
in Blueprint as follows:

<cm:property-placeholder id="config-test-blueprint-placeholder" 
persistent-id="test.config" update-strategy="reload"> 
    <cm:property name="test.property.1" value="Test 1" /> 

The corresponding configuration file in $KARAF_HOME/etc looks as follows:

test.property.1 = Test Value 1 

When adding the following Metatype information, the synchronization mechanism stops working,
i.e. changes made in OSGi config admin using  webconsole are not written back to the configuration

<AD name="Test Property 1" id="test.property.1" required="true"
            type="String" default="Default value 1" description="This is test property 1"

The only way to fix synchronization is to add the following attribute definition to Metatype:
        <AD name="felix.fileinstall.filename" id="felix.fileinstall.filename" 
            required="true" type="String" default="" description="Don't modify this property!"

This has been also discussed on the Karaf users mailing list, see: http://karaf.922171.n3.nabble.com/Blueprint-Property-Placeholders-with-Metatype-Information-td4042619.html

This message was sent by Atlassian JIRA

View raw message