From dev-return-11864-apmail-jackrabbit-dev-archive=jackrabbit.apache.org@jackrabbit.apache.org Mon May 07 09:11:46 2007 Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 38221 invoked from network); 7 May 2007 09:11:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 May 2007 09:11:46 -0000 Received: (qmail 1723 invoked by uid 500); 7 May 2007 09:11:51 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 1700 invoked by uid 500); 7 May 2007 09:11:51 -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 1691 invoked by uid 99); 7 May 2007 09:11:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 May 2007 02:11:51 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [192.18.19.7] (HELO sineb-mail-2.sun.com) (192.18.19.7) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 May 2007 02:11:43 -0700 Received: from fe-apac-04.sun.com (fe-apac-04.sun.com [192.18.19.175] (may be forged)) by sineb-mail-2.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l479BGSU011981 for ; Mon, 7 May 2007 09:11:21 GMT Received: from conversion-daemon.mail-apac.sun.com by mail-apac.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) id <0JHN00801YPXRK00@mail-apac.sun.com> (original mail from Ruchi.Goel@Sun.COM) for dev@jackrabbit.apache.org; Mon, 07 May 2007 17:11:16 +0800 (SGT) Received: from [129.158.227.116] by mail-apac.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPSA id <0JHN001W0YUS2H10@mail-apac.sun.com> for dev@jackrabbit.apache.org; Mon, 07 May 2007 17:11:16 +0800 (SGT) Date: Mon, 07 May 2007 14:41:15 +0530 From: ruchi goel Subject: Re: unlocking a locked node in session scope In-reply-to: <90a8d1c00705040816m73fda01h50bca71f8d820dd0@mail.gmail.com> Sender: Ruchi.Goel@Sun.COM To: dev@jackrabbit.apache.org Message-id: <463EED33.5050408@sun.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT References: <463B2967.3000508@sun.com> <90a8d1c00705040816m73fda01h50bca71f8d820dd0@mail.gmail.com> User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) X-Virus-Checked: Checked by ClamAV on apache.org Thanks. Let me try your code snippet from an rmi client and see if that works fine. Then , may be I can conclude that it is jcr-mapping layer issue. Regards Ruchi Stefan Guggisberg wrote: > hi ruchi > > On 5/4/07, ruchi goel wrote: >> Hi, >> I locked a node in a session where lock is session scoped. Now I >> logout from the session without unlocking . When I again login by same >> user (or by any other user) , the node.isLocked () returns true. >> >> Via jcr-mapping PersistenceManager , I am not able to do save, remove >> because checkIfNodeLocked throws back exception. >> >> >> As per jcr specs , the lock should expire along with the session but >> that is not happening. >> Even if I logout explicitly, rerun the repository , I still see >> jcr:lockOwner property value set to "superuser" who locked the node. >> I am using RMI for accessing repsoitory. >> Am I missing something ? >> > > i quickly ran a test using the following code snippet: > > > Session s = r.login(new SimpleCredentials("johndoe", > "".toCharArray()), wspName); > Node n = s.getRootNode().getNode("lockTest"); > > Lock lck = n.lock(true, true); // session-scoped, deep lock > tn.setProperty("blah", "blah"); > s.logout(); > > Session s1 = r.login(new SimpleCredentials("johndoe", > "".toCharArray()), wspName); > > System.out.println("Lock#isLive=" + lck.isLive()); > System.out.println("Node#isLocked=" + > s1.getRootNode().getNode("lockTest").isLocked()); > > > the (correct) console output is: > > Lock#isLive=false > Node#isLocked=false > > > i am not familiar with the jcr-mapping code. i assume your issue is > either > jcr-mapping or jcr-rmi related. > > please create a jira issue and attach a simple test case (if possible). > > cheers > stefan > >> >> help appreciated. >> >> Thanks, >> Ruchi >> >> >> >>