views:

367

answers:

1

I'm new to OSGi. My aim is to create a structure with the config admin, so you can enter a configuration, which will be reused after restarting the server.

While I have read the api and tried some samples, I thought this feature will be included by default.

My question to you: Is this possible at all and if yes: what have I to consider to get this functionality?

PS. I'm using Equinox

cheers chris

+2  A: 

Configuration entered into Configuration Admin Service is persisted by default. However note that each implementation of Config Admin Service persists the configuration in its own way.

Equinox Config Admin (org.eclipse.equinox.cm) stores the configuration data in the persistent storage area provided by the Framework. And that happens to be the "local bundle cache" directory by default for Equinox.

Therefore each time you wipe-out the bundle cache or uninstall/reinstall the Config Admin Service bundle your configuration data will be lost. Unfortunately there seems to be no easy way to explicitly change the configuration data storage location for Equinox Config Admin service (possible with Felix Configuration Admin Service).

Pavol Juhos
The answer in this question gives the missing hint to use a "real" persistent configuration: http://stackoverflow.com/questions/1260276/configure-equinox-to-modify-the-management-of-the-local-bundle-cache
ChrisBenyamin