You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "raghutpk (Created) (JIRA)" <ji...@apache.org> on 2011/10/21 06:54:33 UTC

[jira] [Created] (CONFIGURATION-467) Unable to persist CombinedConfiguration changes to the Filesystem.

Unable to persist CombinedConfiguration changes to the Filesystem.
------------------------------------------------------------------

                 Key: CONFIGURATION-467
                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-467
             Project: Commons Configuration
          Issue Type: Bug
          Components: File reloading
    Affects Versions: 1.6
         Environment: Linux java
            Reporter: raghutpk
             Fix For: 1.8




I use a config.xml file to load multiple Configuration Sources 
Ex: 
<configuration>
<header/>
<override>
<properties fileName="db.properties"/>
<properties fileName="jms.properties"/>
<xml fileName="gui.xml"/>
</override>
<additional/>
</configuration>

I load the config.xml and subsequently all the properties in my app to a CombinedConfiguration Object as follows :

DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
builder.setFile(new File("config.xml"));
CombinedConfiguration combinedConfig = builder.getConfiguration(true);


Now I am trying to expose all the properties from all configuration sources using a mbean and at runtime trying to update the Properties. I wouldn't know though, from which source the properties came from as the CombinedConfiguration takes care of that abstraction, but when I do the following it doesn't change the persistance store(in this case the files on the Filesystem).
/*combinedConfig.setProperty(Key, updatedValue);*/

There is no save method on the combinedConfiguration class so that the persistance store gets updated.
There is a save method in PropertiesConfiguration class or XMLConfiguration class, but I wouldn't know at runtime or inside the code which file or configuration source the Key belongs to, so even If I add a config-name to each source there is no use. 

SO wouldn't the setProperty help me update the value of the Configuration and persist it back to the original file. I don't know it is a bug or a feature it doesn't support or there is a workaround in such scenarios. 

Please advice.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CONFIGURATION-467) Unable to persist CombinedConfiguration changes to the Filesystem.

Posted by "Emmanuel Bourg (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONFIGURATION-467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Bourg updated CONFIGURATION-467:
-----------------------------------------

      Description: 

I use a config.xml file to load multiple Configuration Sources 
Ex: 
{code:xml}
<configuration>
  <header/>
  <override>
    <properties fileName="db.properties"/>
    <properties fileName="jms.properties"/>
    <xml fileName="gui.xml"/>
  </override>
  <additional/>
</configuration>
{code}
I load the config.xml and subsequently all the properties in my app to a CombinedConfiguration Object as follows :

{code:java}
DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
builder.setFile(new File("config.xml"));
CombinedConfiguration combinedConfig = builder.getConfiguration(true);
{code}

Now I am trying to expose all the properties from all configuration sources using a mbean and at runtime trying to update the Properties. I wouldn't know though, from which source the properties came from as the CombinedConfiguration takes care of that abstraction, but when I do the following it doesn't change the persistance store(in this case the files on the Filesystem).
/*combinedConfig.setProperty(Key, updatedValue);*/

There is no save method on the combinedConfiguration class so that the persistance store gets updated.
There is a save method in PropertiesConfiguration class or XMLConfiguration class, but I wouldn't know at runtime or inside the code which file or configuration source the Key belongs to, so even If I add a config-name to each source there is no use. 

SO wouldn't the setProperty help me update the value of the Configuration and persist it back to the original file. I don't know it is a bug or a feature it doesn't support or there is a workaround in such scenarios. 

Please advice.


  was:


I use a config.xml file to load multiple Configuration Sources 
Ex: 
<configuration>
<header/>
<override>
<properties fileName="db.properties"/>
<properties fileName="jms.properties"/>
<xml fileName="gui.xml"/>
</override>
<additional/>
</configuration>

I load the config.xml and subsequently all the properties in my app to a CombinedConfiguration Object as follows :

DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
builder.setFile(new File("config.xml"));
CombinedConfiguration combinedConfig = builder.getConfiguration(true);


Now I am trying to expose all the properties from all configuration sources using a mbean and at runtime trying to update the Properties. I wouldn't know though, from which source the properties came from as the CombinedConfiguration takes care of that abstraction, but when I do the following it doesn't change the persistance store(in this case the files on the Filesystem).
/*combinedConfig.setProperty(Key, updatedValue);*/

There is no save method on the combinedConfiguration class so that the persistance store gets updated.
There is a save method in PropertiesConfiguration class or XMLConfiguration class, but I wouldn't know at runtime or inside the code which file or configuration source the Key belongs to, so even If I add a config-name to each source there is no use. 

SO wouldn't the setProperty help me update the value of the Configuration and persist it back to the original file. I don't know it is a bug or a feature it doesn't support or there is a workaround in such scenarios. 

Please advice.


    Fix Version/s:     (was: 1.8)
           Labels:   (was: apache-commons-configuration features newbie)
       Issue Type: Improvement  (was: Bug)
    
> Unable to persist CombinedConfiguration changes to the Filesystem.
> ------------------------------------------------------------------
>
>                 Key: CONFIGURATION-467
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-467
>             Project: Commons Configuration
>          Issue Type: Improvement
>          Components: File reloading
>    Affects Versions: 1.6
>         Environment: Linux java
>            Reporter: raghutpk
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> I use a config.xml file to load multiple Configuration Sources 
> Ex: 
> {code:xml}
> <configuration>
>   <header/>
>   <override>
>     <properties fileName="db.properties"/>
>     <properties fileName="jms.properties"/>
>     <xml fileName="gui.xml"/>
>   </override>
>   <additional/>
> </configuration>
> {code}
> I load the config.xml and subsequently all the properties in my app to a CombinedConfiguration Object as follows :
> {code:java}
> DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
> builder.setFile(new File("config.xml"));
> CombinedConfiguration combinedConfig = builder.getConfiguration(true);
> {code}
> Now I am trying to expose all the properties from all configuration sources using a mbean and at runtime trying to update the Properties. I wouldn't know though, from which source the properties came from as the CombinedConfiguration takes care of that abstraction, but when I do the following it doesn't change the persistance store(in this case the files on the Filesystem).
> /*combinedConfig.setProperty(Key, updatedValue);*/
> There is no save method on the combinedConfiguration class so that the persistance store gets updated.
> There is a save method in PropertiesConfiguration class or XMLConfiguration class, but I wouldn't know at runtime or inside the code which file or configuration source the Key belongs to, so even If I add a config-name to each source there is no use. 
> SO wouldn't the setProperty help me update the value of the Configuration and persist it back to the original file. I don't know it is a bug or a feature it doesn't support or there is a workaround in such scenarios. 
> Please advice.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CONFIGURATION-467) Unable to persist CombinedConfiguration changes to the Filesystem.

Posted by "raghutpk (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONFIGURATION-467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13132725#comment-13132725 ] 

raghutpk commented on CONFIGURATION-467:
----------------------------------------

Thank you very much for the early response. I really apprecieate that. The temporarily proposed solution doesn't seem to work on the scenario given. I added the autoSave="true" for all the config sources in config.xml as specified, but
{code:java}
combinedConfig.setProperty("Key","updatedValue");
{code}
doesn't still persist to the Filesystem.
{code:java}
System.out.println(combinedConfig.getProperty("Key"));
{code}
The above code will give me the updatedValue(but it is temporary as only the object in memory is modified) but still I have no way to persist it back to the filesyatem. Anthing else could be done to the CombinedConfig object so as to acheieve the objective.

I can attach the screenshots if necessary

                
> Unable to persist CombinedConfiguration changes to the Filesystem.
> ------------------------------------------------------------------
>
>                 Key: CONFIGURATION-467
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-467
>             Project: Commons Configuration
>          Issue Type: Improvement
>          Components: File reloading
>    Affects Versions: 1.6
>         Environment: Linux java
>            Reporter: raghutpk
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> I use a config.xml file to load multiple Configuration Sources 
> Ex: 
> {code:xml}
> <configuration>
>   <header/>
>   <override>
>     <properties fileName="db.properties"/>
>     <properties fileName="jms.properties"/>
>     <xml fileName="gui.xml"/>
>   </override>
>   <additional/>
> </configuration>
> {code}
> I load the config.xml and subsequently all the properties in my app to a CombinedConfiguration Object as follows :
> {code:java}
> DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
> builder.setFile(new File("config.xml"));
> CombinedConfiguration combinedConfig = builder.getConfiguration(true);
> {code}
> Now I am trying to expose all the properties from all configuration sources using a mbean and at runtime trying to update the Properties. I wouldn't know though, from which source the properties came from as the CombinedConfiguration takes care of that abstraction, but when I do the following it doesn't change the persistance store(in this case the files on the Filesystem).
> /*combinedConfig.setProperty(Key, updatedValue);*/
> There is no save method on the combinedConfiguration class so that the persistance store gets updated.
> There is a save method in PropertiesConfiguration class or XMLConfiguration class, but I wouldn't know at runtime or inside the code which file or configuration source the Key belongs to, so even If I add a config-name to each source there is no use. 
> SO wouldn't the setProperty help me update the value of the Configuration and persist it back to the original file. I don't know it is a bug or a feature it doesn't support or there is a workaround in such scenarios. 
> Please advice.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Reopened] (CONFIGURATION-467) Unable to persist CombinedConfiguration changes to the Filesystem.

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

raghutpk reopened CONFIGURATION-467:
------------------------------------


Thank you very much for the early response. I really apprecieate that. The temporarily proposed solution doesn't seem to work on the scenario given. I added the autoSave="true" for all the config sources in config.xml as specified, but
{code:java}
combinedConfig.setProperty("Key","updatedValue");
{code}
doesn't still persist to the Filesystem.
{code:java}
System.out.println(combinedConfig.getProperty("Key"));
{code}
The above code will give me the updatedValue(but it is temporary as only the object in memory is modified) but still I have no way to persist it back to the filesyatem. Anthing else could be done to the CombinedConfig object so as to acheieve the objective.

I can attach the screenshots if necessary

                
> Unable to persist CombinedConfiguration changes to the Filesystem.
> ------------------------------------------------------------------
>
>                 Key: CONFIGURATION-467
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-467
>             Project: Commons Configuration
>          Issue Type: Improvement
>          Components: File reloading
>    Affects Versions: 1.6
>         Environment: Linux java
>            Reporter: raghutpk
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> I use a config.xml file to load multiple Configuration Sources 
> Ex: 
> {code:xml}
> <configuration>
>   <header/>
>   <override>
>     <properties fileName="db.properties"/>
>     <properties fileName="jms.properties"/>
>     <xml fileName="gui.xml"/>
>   </override>
>   <additional/>
> </configuration>
> {code}
> I load the config.xml and subsequently all the properties in my app to a CombinedConfiguration Object as follows :
> {code:java}
> DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
> builder.setFile(new File("config.xml"));
> CombinedConfiguration combinedConfig = builder.getConfiguration(true);
> {code}
> Now I am trying to expose all the properties from all configuration sources using a mbean and at runtime trying to update the Properties. I wouldn't know though, from which source the properties came from as the CombinedConfiguration takes care of that abstraction, but when I do the following it doesn't change the persistance store(in this case the files on the Filesystem).
> /*combinedConfig.setProperty(Key, updatedValue);*/
> There is no save method on the combinedConfiguration class so that the persistance store gets updated.
> There is a save method in PropertiesConfiguration class or XMLConfiguration class, but I wouldn't know at runtime or inside the code which file or configuration source the Key belongs to, so even If I add a config-name to each source there is no use. 
> SO wouldn't the setProperty help me update the value of the Configuration and persist it back to the original file. I don't know it is a bug or a feature it doesn't support or there is a workaround in such scenarios. 
> Please advice.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CONFIGURATION-467) Unable to persist CombinedConfiguration changes to the Filesystem.

Posted by "Emmanuel Bourg (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONFIGURATION-467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13132650#comment-13132650 ] 

Emmanuel Bourg commented on CONFIGURATION-467:
----------------------------------------------

There is a proposal to add a save method to all configurations, that would cover your case (CONFIGURATION-311). In the meantime a solution is to enable the auto-save feature on your file based configurations:

{code}
<configuration>
  <header/>
  <override>
    <properties fileName="db.properties" autoSave="true"/>
    <properties fileName="jms.properties" autoSave="true"/>
    <xml fileName="gui.xml" autoSave="true"/>
  </override>
  <additional/>
</configuration>
{code}
                
> Unable to persist CombinedConfiguration changes to the Filesystem.
> ------------------------------------------------------------------
>
>                 Key: CONFIGURATION-467
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-467
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: File reloading
>    Affects Versions: 1.6
>         Environment: Linux java
>            Reporter: raghutpk
>              Labels: apache-commons-configuration, features, newbie
>             Fix For: 1.8
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> I use a config.xml file to load multiple Configuration Sources 
> Ex: 
> <configuration>
> <header/>
> <override>
> <properties fileName="db.properties"/>
> <properties fileName="jms.properties"/>
> <xml fileName="gui.xml"/>
> </override>
> <additional/>
> </configuration>
> I load the config.xml and subsequently all the properties in my app to a CombinedConfiguration Object as follows :
> DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
> builder.setFile(new File("config.xml"));
> CombinedConfiguration combinedConfig = builder.getConfiguration(true);
> Now I am trying to expose all the properties from all configuration sources using a mbean and at runtime trying to update the Properties. I wouldn't know though, from which source the properties came from as the CombinedConfiguration takes care of that abstraction, but when I do the following it doesn't change the persistance store(in this case the files on the Filesystem).
> /*combinedConfig.setProperty(Key, updatedValue);*/
> There is no save method on the combinedConfiguration class so that the persistance store gets updated.
> There is a save method in PropertiesConfiguration class or XMLConfiguration class, but I wouldn't know at runtime or inside the code which file or configuration source the Key belongs to, so even If I add a config-name to each source there is no use. 
> SO wouldn't the setProperty help me update the value of the Configuration and persist it back to the original file. I don't know it is a bug or a feature it doesn't support or there is a workaround in such scenarios. 
> Please advice.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CONFIGURATION-467) Unable to persist CombinedConfiguration changes to the Filesystem.

Posted by "Emmanuel Bourg (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONFIGURATION-467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Bourg resolved CONFIGURATION-467.
------------------------------------------

    Resolution: Duplicate
    
> Unable to persist CombinedConfiguration changes to the Filesystem.
> ------------------------------------------------------------------
>
>                 Key: CONFIGURATION-467
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-467
>             Project: Commons Configuration
>          Issue Type: Improvement
>          Components: File reloading
>    Affects Versions: 1.6
>         Environment: Linux java
>            Reporter: raghutpk
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> I use a config.xml file to load multiple Configuration Sources 
> Ex: 
> {code:xml}
> <configuration>
>   <header/>
>   <override>
>     <properties fileName="db.properties"/>
>     <properties fileName="jms.properties"/>
>     <xml fileName="gui.xml"/>
>   </override>
>   <additional/>
> </configuration>
> {code}
> I load the config.xml and subsequently all the properties in my app to a CombinedConfiguration Object as follows :
> {code:java}
> DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
> builder.setFile(new File("config.xml"));
> CombinedConfiguration combinedConfig = builder.getConfiguration(true);
> {code}
> Now I am trying to expose all the properties from all configuration sources using a mbean and at runtime trying to update the Properties. I wouldn't know though, from which source the properties came from as the CombinedConfiguration takes care of that abstraction, but when I do the following it doesn't change the persistance store(in this case the files on the Filesystem).
> /*combinedConfig.setProperty(Key, updatedValue);*/
> There is no save method on the combinedConfiguration class so that the persistance store gets updated.
> There is a save method in PropertiesConfiguration class or XMLConfiguration class, but I wouldn't know at runtime or inside the code which file or configuration source the Key belongs to, so even If I add a config-name to each source there is no use. 
> SO wouldn't the setProperty help me update the value of the Configuration and persist it back to the original file. I don't know it is a bug or a feature it doesn't support or there is a workaround in such scenarios. 
> Please advice.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CONFIGURATION-467) Unable to persist CombinedConfiguration changes to the Filesystem.

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

raghutpk updated CONFIGURATION-467:
-----------------------------------

    Comment: was deleted

(was: Thank you very much for the early response. I really apprecieate that. The temporarily proposed solution doesn't seem to work on the scenario given. I added the autoSave="true" for all the config sources in config.xml as specified, but
{code:java}
combinedConfig.setProperty("Key","updatedValue");
{code}
doesn't still persist to the Filesystem.
{code:java}
System.out.println(combinedConfig.getProperty("Key"));
{code}
The above code will give me the updatedValue(but it is temporary as only the object in memory is modified) but still I have no way to persist it back to the filesyatem. Anthing else could be done to the CombinedConfig object so as to acheieve the objective.

I can attach the screenshots if necessary
)
    
> Unable to persist CombinedConfiguration changes to the Filesystem.
> ------------------------------------------------------------------
>
>                 Key: CONFIGURATION-467
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-467
>             Project: Commons Configuration
>          Issue Type: Improvement
>          Components: File reloading
>    Affects Versions: 1.6
>         Environment: Linux java
>            Reporter: raghutpk
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> I use a config.xml file to load multiple Configuration Sources 
> Ex: 
> {code:xml}
> <configuration>
>   <header/>
>   <override>
>     <properties fileName="db.properties"/>
>     <properties fileName="jms.properties"/>
>     <xml fileName="gui.xml"/>
>   </override>
>   <additional/>
> </configuration>
> {code}
> I load the config.xml and subsequently all the properties in my app to a CombinedConfiguration Object as follows :
> {code:java}
> DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
> builder.setFile(new File("config.xml"));
> CombinedConfiguration combinedConfig = builder.getConfiguration(true);
> {code}
> Now I am trying to expose all the properties from all configuration sources using a mbean and at runtime trying to update the Properties. I wouldn't know though, from which source the properties came from as the CombinedConfiguration takes care of that abstraction, but when I do the following it doesn't change the persistance store(in this case the files on the Filesystem).
> /*combinedConfig.setProperty(Key, updatedValue);*/
> There is no save method on the combinedConfiguration class so that the persistance store gets updated.
> There is a save method in PropertiesConfiguration class or XMLConfiguration class, but I wouldn't know at runtime or inside the code which file or configuration source the Key belongs to, so even If I add a config-name to each source there is no use. 
> SO wouldn't the setProperty help me update the value of the Configuration and persist it back to the original file. I don't know it is a bug or a feature it doesn't support or there is a workaround in such scenarios. 
> Please advice.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CONFIGURATION-467) Unable to persist CombinedConfiguration changes to the Filesystem.

Posted by "Oliver Heger (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONFIGURATION-467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13188700#comment-13188700 ] 

Oliver Heger commented on CONFIGURATION-467:
--------------------------------------------

The problem probably lies in the way CombinedConfiguration organizes its internal node structures: the data from the contained configurations are combined to a logic node tree. If the child configurations are hierarchical (e.g. like XMLConfiguration), their node structures are directly incorporated in the combined tree. In this case updates of the nodes also affect the corresponding child configurations.

However, in case of flat configurations (like PropertiesConfiguration), a new node structure is created based on the data stored in the configuration. This structure is not connected to the original configuration, so updates performed by the combined configuration do not affect the child configurations.

There is currently no work-around I am aware of. CombinedConfiguration was originally more intended to act as a view on multiple child configurations. It can detect changes on its children and rebuilt itself, but it does not work the other way around. See also the description in the user guide at http://commons.apache.org/configuration/userguide/howto_combinedconfiguration.html#Dealing_with_changes.
                
> Unable to persist CombinedConfiguration changes to the Filesystem.
> ------------------------------------------------------------------
>
>                 Key: CONFIGURATION-467
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-467
>             Project: Commons Configuration
>          Issue Type: Improvement
>          Components: File reloading
>    Affects Versions: 1.6
>         Environment: Linux java
>            Reporter: raghutpk
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> I use a config.xml file to load multiple Configuration Sources 
> Ex: 
> {code:xml}
> <configuration>
>   <header/>
>   <override>
>     <properties fileName="db.properties"/>
>     <properties fileName="jms.properties"/>
>     <xml fileName="gui.xml"/>
>   </override>
>   <additional/>
> </configuration>
> {code}
> I load the config.xml and subsequently all the properties in my app to a CombinedConfiguration Object as follows :
> {code:java}
> DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
> builder.setFile(new File("config.xml"));
> CombinedConfiguration combinedConfig = builder.getConfiguration(true);
> {code}
> Now I am trying to expose all the properties from all configuration sources using a mbean and at runtime trying to update the Properties. I wouldn't know though, from which source the properties came from as the CombinedConfiguration takes care of that abstraction, but when I do the following it doesn't change the persistance store(in this case the files on the Filesystem).
> /*combinedConfig.setProperty(Key, updatedValue);*/
> There is no save method on the combinedConfiguration class so that the persistance store gets updated.
> There is a save method in PropertiesConfiguration class or XMLConfiguration class, but I wouldn't know at runtime or inside the code which file or configuration source the Key belongs to, so even If I add a config-name to each source there is no use. 
> SO wouldn't the setProperty help me update the value of the Configuration and persist it back to the original file. I don't know it is a bug or a feature it doesn't support or there is a workaround in such scenarios. 
> Please advice.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira