From users-return-4909-apmail-jackrabbit-users-archive=jackrabbit.apache.org@jackrabbit.apache.org Wed Sep 12 13:05:27 2007 Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 70742 invoked from network); 12 Sep 2007 13:05:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Sep 2007 13:05:27 -0000 Received: (qmail 39853 invoked by uid 500); 12 Sep 2007 13:05:19 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 39833 invoked by uid 500); 12 Sep 2007 13:05:19 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 39824 invoked by uid 99); 12 Sep 2007 13:05:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Sep 2007 06:05:19 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [194.8.61.8] (HELO spamslammer2.tirol.gv.at) (194.8.61.8) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Sep 2007 13:06:54 +0000 Received: from mailscan1.tirol.local (mailscan1.tirol.local [10.10.128.204]) by spamslammer2.tirol.gv.at (Spamslammer) with ESMTP id 6B77322FXE for ; Wed, 12 Sep 2007 15:04:56 +0200 (CEST) Received: from mxs0.tirol.local (unverified) by mailscan1.tirol.local (Clearswift SMTPRS 5.2.9) with ESMTP id for ; Wed, 12 Sep 2007 15:04:56 +0200 Received: from mxs01.tirol.local ([10.10.128.211]) by mxs0.tirol.local with Microsoft SMTPSVC(6.0.3790.1830); Wed, 12 Sep 2007 15:04:56 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: AW: lock question Date: Wed, 12 Sep 2007 15:04:56 +0200 Message-ID: In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: lock question Thread-Index: Acf1ORSdM9u0ria8QcCtOgas87i58QAAphPwAABa3ZA= References: <90a8d1c00709120520m7a54067cube70eb2732832355@mail.gmail.com> <46E7DAF4.5040704@apache.org> <90a8d1c00709120532r1b9d5906u4850df87bc6e3347@mail.gmail.com> From: =?iso-8859-1?Q?K=D6LL_Claus?= To: X-OriginalArrivalTime: 12 Sep 2007 13:04:56.0256 (UTC) FILETIME=[842ADC00:01C7F53D] X-Virus-Checked: Checked by ClamAV on apache.org if i login again i try this code .. LockManager lockManager =3D ((SessionImpl)session).getLockManager(); lockManager.holdsLock((NodeImpl)foo); =20 //returns true Lock myLock =3D lockManager.getLock((NodeImpl)foo); myLock.getLockOwner();=20 //returns valid userid myLock.isSessionScoped(); //returns true lockManager.isLockHolder(session, (NodeImpl)foo); //returns false myLock.getLockToken(); //returns null ! greets claus -----Urspr=FCngliche Nachricht----- Von: K=D6LL Claus [mailto:C.KOELL@TIROL.GV.AT]=20 Gesendet: Mittwoch, 12. September 2007 14:57 An: users@jackrabbit.apache.org Betreff: AW: lock question hi stefan, first thanks for the infos. how can i remove the lock if i can not save the lock token from the = first session. something like this .. session.getRootNode().getNode("path/to/lockable/node").lock(true, = false); now log out .. login again and remove the lock .. how ? thanks claus -----Urspr=FCngliche Nachricht----- Von: Stefan Guggisberg [mailto:stefan.guggisberg@gmail.com]=20 Gesendet: Mittwoch, 12. September 2007 14:33 An: users@jackrabbit.apache.org Betreff: Re: lock question On 9/12/07, Carsten Ziegeler wrote: > Stefan Guggisberg wrote: > > you need to transfer the lock token from the session that created = the > > lock to the new session., e.g. like this: > > > > Lock lock =3D > > > > sessionA.getRootNode().getNode("path/to/lockable/node").lock(true, > > false); > > String token =3D lock.getLockToken(); > > sessionA.removeLockToken(token); > > ... > > sessionB.addLockToken(token); > > = sessionB.getRootNode().getNode("path/to/lockable/node").unlock(); > > > > > Is it required to remove the lock token from the first session? if you log out the first session before you transfer the lock token, no. otherwise you'll have to remove it since only one session can hold a particular lock token. cheers stefan > > Carsten > > -- > Carsten Ziegeler > cziegeler@apache.org >