felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felix Meschberger (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (FELIX-317) Modifying a Configuration retrieved from listConfigurations is not reflected in the ConfigAdmin
Date Wed, 04 Jul 2007 07:23:04 GMT

     [ https://issues.apache.org/jira/browse/FELIX-317?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Felix Meschberger resolved FELIX-317.

    Resolution: Fixed

Deployed a new build to the Apache snapshot repositorys.

> Modifying a Configuration retrieved from listConfigurations is not reflected in the ConfigAdmin
> -----------------------------------------------------------------------------------------------
>                 Key: FELIX-317
>                 URL: https://issues.apache.org/jira/browse/FELIX-317
>             Project: Felix
>          Issue Type: Bug
>          Components: Configuration Admin
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: 1.0.0
> The ConfigurationAdmin.listConfigurations implementation accesses the configuration persistence
managers to get all configurations and returns these configurations. That is, the Configuration
objects returned are not backed by the same data as is cached inside the ConfigurationManager.
When such a listed configuration is then updated, it is persisted, but the internally cached
configuration data does not reflect the changes.
> This issue may be illustrated with this test code:
>      ConfigurationAdmin ca = getConfigurationAdmin();
>      // initialize configuration
>      Dictionary dict = new Hashtable();
>      dict.put("sample", "old_value");
>      ca.getConfiguration("sample.pid").update(dict);
>      // modify the listed configuration
>      Configuraiton[] cfg = ca.listConfigurations("service.pid = sample.pid");
>      Dictionary dict = cfg[0].getProperties();
>      dict.put("sample", "new_value");
>      cfg[0].update(dict);
>     Configuration config = ac.getConfiguration("sample.pid");
>     Object theValue = config.getProperties().get("sample");
> The theValue variable is expected to contain "new_value" but actually contains "old_value".
> Thanks to Tom Remoleur for reporting this issue and providing the test case.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message