On Wed, Oct 13, 2010 at 9:05 AM, Christian Schneider
<[email protected]> wrote:
> 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?

IMHO yes. We are using this approach too.

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

AFAIK the specification doesn't tell about the persistence format.
Felix config admin implementation uses *.config and they are not meant
to be edited by hand althought we also do this :-). But the change is
not dynamic - if you edit the config file during runtime, bundle will
not see the changes until config admin bundle restarts.

Other config admin implementations can store data to database or
binary formats....

For managing the configuration you can use Felix Web Console,
http://opensource.luminis.net/wiki/display/SITE/OSGi+Configuration+Admin+command+line+client
or other/your impementation.

BR
-- 
Ing. Martin Ždila
CTO

M-Way Solutions Slovakia s.r.o.
Letná 27, 040 01 Košice
Slovakia

tel:+421-908-363-848
mailto:[email protected]
http://www.mwaysolutions.com

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

Reply via email to