You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2007/07/04 08:54:05 UTC

[jira] Created: (FELIX-317) Modifying a Configuration retrieved from listConfigurations is not reflected in the ConfigAdmin

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
             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.


[jira] Assigned: (FELIX-317) Modifying a Configuration retrieved from listConfigurations is not reflected in the ConfigAdmin

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-317?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger reassigned FELIX-317:
---------------------------------------

    Assignee: Felix Meschberger

> 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.


[jira] Commented: (FELIX-317) Modifying a Configuration retrieved from listConfigurations is not reflected in the ConfigAdmin

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12510098 ] 

Felix Meschberger commented on FELIX-317:
-----------------------------------------

Fixed by changing the ConfigurationManager.listConfigurations method to crosscheck with the internal cached configurations before adding a new Configuration proxy to the list.

Fixed in Rev. 553107

> 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.


[jira] Closed: (FELIX-317) Modifying a Configuration retrieved from listConfigurations is not reflected in the ConfigAdmin

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-317?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger closed FELIX-317.
-----------------------------------


Fix confirmed to work correctly.

> 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.


[jira] Resolved: (FELIX-317) Modifying a Configuration retrieved from listConfigurations is not reflected in the ConfigAdmin

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ 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.


How to unsubscribe?

Posted by "asaf.lahav" <as...@gmail.com>.
How can I unsubscribe from this list?


[jira] Work started: (FELIX-317) Modifying a Configuration retrieved from listConfigurations is not reflected in the ConfigAdmin

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-317?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on FELIX-317 started by Felix Meschberger.

> 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.