felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject New UserAdmin impl: roles not loaded after restart
Date Tue, 23 Oct 2012 18:36:03 GMT
I've been playing with the new UserAdmin implementation to see if I can
use it. I wrote a few shell commands to play with adding users, roles
and groups, to set credential, to list roles etc. At first that worked
well. But when I restarted the server, the users I added were gone. I
went looking into the data directory but the users seem to have been
saved correctly. So I went into the source code, and I'm now wondering
if there isn't a little problem with the way the RoleRepositoryStore is
attached. I found that it has the life-cycle methods initialize() and
close() which are called by RoleRepositoryStoreHelper if a
RoleRepositoryStore is available.

    public void initialize() throws IOException {
        RoleRepositoryStore store = getStore();
        if (store != null) {

If the store service is started after the UserAdmin service, the
initialize() method is, I think, never called. It seems to me that
having life-cycle methods in the store interface is in conflict with
OSGi's own service life-cycle. I'd expect the service to initialize
itself when it's started. And maybe the UserAdmin service should only
expose itself when it has a store service availble. Am I missing

Jeremias Maerki

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

View raw message