Hi,
I am currently also evaluating the config admin service. I ported a
spring application to osgi and now have the problem where to put the
properties files. The property files contain db and jms connection infos.
Is config admin service the right tool for this job?
I already succeeded in creating the config programmatically and using it
in spring with help of the spring osgi config admin support. As
implementation I used the felix cm bundle. What I do not like is that
the persisted files contain additional information compared to the
normal property files. So it is quite difficult to create and change
them by hand. If I only put the original properties into the file I even
get a nullpointer exception.
Is it possible to conffigure felix cm to work with pure propety files
that do not contain additional information or would you recommand
another aproach?
Thanks
Christian
Am 13.10.2010 08:14, schrieb Felix Meschberger:
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]
--
----
http://www.liquid-reality.de
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]