commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jamie Guillemette" <JMGuilleme...@hotmail.com>
Subject Re: [configuration] - save not working..?
Date Wed, 06 Apr 2005 12:19:47 GMT
Hey Emmanuel,

here is how i load the config.

[code]
public PropertiesConfiguration loadPropertyConfiguration(String 
configFileName)throws ConfigurationException{
  URL configURL = this.getClass().getResource(configFileName);
  return  new PropertiesConfiguration(configURL);
 }
[/code]


----- Original Message ----- 
From: "Emmanuel Bourg" <ebourg@apache.org>
To: "Jakarta Commons Users List" <commons-user@jakarta.apache.org>
Sent: Wednesday, April 06, 2005 7:59 AM
Subject: Re: [configuration] - save not working..?


> Hi Jamies, could you show us how the configuration is loaded ?
>
> Emmanuel Bourg
>
>
> Jamie Guillemette wrote:
>> Hi Guys,
>>
>> Was playing with the commons-configuration project last night and for the 
>> life of me was unable to successfully save configuration changes. No 
>> exceptions are thrown but the data physically remains unchanged in the 
>> properties file.
>>
>> [code]
>>
>> public void set(Object value)throws ConfigurationException {
>>   config.setProperty("name.first",value);
>>   config.save();
>>   config.reload();
>>  }
>>
>> [/code]
>>
>> where config is : private PropertiesConfiguration config;
>> that is successuflly loaded and returns values from the properties file 
>> using
>>
>> [code]
>> public Object get() {
>>   return config.getString("name.first"); }
>> [/code]
>>
>> Anyone know if this is a know bug ?
>>
>> Thanks
>> J.
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message