Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 13593 invoked from network); 11 Mar 2010 11:26:07 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 11 Mar 2010 11:26:07 -0000 Received: (qmail 17825 invoked by uid 500); 11 Mar 2010 11:25:34 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 17791 invoked by uid 500); 11 Mar 2010 11:25:34 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 17784 invoked by uid 99); 11 Mar 2010 11:25:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Mar 2010 11:25:34 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of anchela@day.com designates 207.126.148.85 as permitted sender) Received: from [207.126.148.85] (HELO psmtp.com) (207.126.148.85) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 11 Mar 2010 11:25:32 +0000 Received: from source ([209.85.220.219]) by eu3sys201aob102.postini.com ([207.126.154.11]) with SMTP ID DSNKS5jTFq7WzN9tSxsdL+lmI/AKsWJAMVgd@postini.com; Thu, 11 Mar 2010 11:25:11 UTC Received: by fxm19 with SMTP id 19so9654109fxm.21 for ; Thu, 11 Mar 2010 03:25:10 -0800 (PST) Received: by 10.223.63.193 with SMTP id c1mr3224891fai.80.1268306710270; Thu, 11 Mar 2010 03:25:10 -0800 (PST) Received: from Angela.local (bsl-rtr.day.com [62.192.10.254]) by mx.google.com with ESMTPS id d13sm2069372fka.2.2010.03.11.03.25.08 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 11 Mar 2010 03:25:09 -0800 (PST) Message-ID: <4B98D319.6030601@day.com> Date: Thu, 11 Mar 2010 12:25:13 +0100 From: Angela Schreiber User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: dev@jackrabbit.apache.org Subject: Re: UserManager autosace issue References: <4B98CB22.1000302@gmail.com> In-Reply-To: <4B98CB22.1000302@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 angela > Thanks and Regards > Felix >