Hi,

On 13.10.2010 05:55, LongkerDandy wrote:
> Hi
> 
> I'm try to use ConfigAdmin to save and load configurations.
> The default place of the configurations is under the cache folder and deep
> into the ConfigAdmin bundle.
> 
> I don't know it is designed like this.

Yes, the default location is the bundle private data area provided by
the framework through the BundleContext.getDataFile(String) method.

> I should suppose to have some pre-defined configuration values,
> And when I deliver my software there is no cache folder, how can I put i
> into this.
> 
> I try to change the configuration location to the felix/conf folder like
> this:
> felix.cm.dir=../../../conf
> 
> But it complains about ".." reference.
> 
> I also wondered if I can use the default "config.properties" with
> ConfigAdmin

You can use and you can change the setup.

BUT: This is not to inject default configuration. This data area must be
configured private to the Configuration Admin service because changes
are expected to only be carried out by the Configuration Admin service.

If you want to provide "default" configuration you might want to
consider FileInstall and provide respective .cfg files. See [1] for more
details.

Hope this helps.

Regards
Felix

[1] http://felix.apache.org/site/apache-felix-file-install.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to