jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@day.com>
Subject Re: UserManager autosace issue
Date Thu, 11 Mar 2010 11:25:13 GMT
hi felix

> Consier a UserManager not set to autosave mode. I do:
>    Group g = userManager.createGroup(groupPrincipal)
>    g.addMemmber(someUser);
> This results in an InvalidItemStateException:
> javax.jcr.InvalidItemStateException:
> c0a1a731-9fea-34fa-aa78-d224bd58a981 has been modified externally
> 	at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1145)
> 	at
> org.apache.jackrabbit.core.security.user.UserManagerImpl.setProtectedProperty(UserManagerImpl.java:581)
> 	at
> org.apache.jackrabbit.core.security.user.GroupImpl.addMember(GroupImpl.java:151)
> I assume this is because the addMember method calls Item.save() while
> the parent node has not been saved yet.

but why is the save method called? if you are *not* in
autosave-mode the save-call should be omitted and you are
in charge of calling session.save to persist the complete
set of transient modifications anyway... strange.

> Is this a known issue worth following up to ?

no, this isn't a known issue... can you check why
Item.save() is called in the first place? and file
a new JIRA issue if it's a bug in the user-management code.

> Thanks and Regards
> Felix

View raw message