You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Vidar Ramdal <vi...@idium.no> on 2011/01/13 14:39:26 UTC

Using a custom PersistenceManager

I want to store some configurations in an alternative
PersistenceManager (which in this case stores configurations in a
content repository).
Thus, I have written a class implementing o.a.f.cm.PersistenceManager,
called RepositoryPersistenceManager (RPM).

When the application is starting initially, RPM's exists and load
methods are invoked as expected. But when altering a configuration via
the Felix Web Console, the modifications are not written back to RPM,
but rather, to the default PersistenceManager (file-based).

Am I missing something here? Shouldn't
org.apache.felix.cm.impl.ConfigurationManager write back changes for a
configuration to the PersistenceManager the configuration was loaded
from?

-- 
Vidar S. Ramdal <vi...@idium.no> - http://www.idium.no
Sommerrogata 13-15, N-0255 Oslo, Norway
+ 47 22 00 84 00
Quando omni flunkus moritatus!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Using a custom PersistenceManager

Posted by Felix Meschberger <fm...@adobe.com>.
Hi,

Sorry for the delay ...

Am Donnerstag, den 13.01.2011, 13:39 +0000 schrieb Vidar Ramdal: 
> I want to store some configurations in an alternative
> PersistenceManager (which in this case stores configurations in a
> content repository).
> Thus, I have written a class implementing o.a.f.cm.PersistenceManager,
> called RepositoryPersistenceManager (RPM).
> 
> When the application is starting initially, RPM's exists and load
> methods are invoked as expected. But when altering a configuration via
> the Felix Web Console, the modifications are not written back to RPM,
> but rather, to the default PersistenceManager (file-based).
> 
> Am I missing something here? Shouldn't
> org.apache.felix.cm.impl.ConfigurationManager write back changes for a
> configuration to the PersistenceManager the configuration was loaded
> from?

No, you are not missing anything. Existing configuration should be
written back to the original PersistenceManager.

New configuration, though, is actually written back to the persistence
manager with the highest service ranking. If you don't set the
service.ranking property in your RPM, chances are, that your new
configurations will be written to the file system persistence manager.

Regards
Felix

> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org