Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 71203 invoked from network); 12 Sep 2007 13:08:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Sep 2007 13:08:07 -0000 Received: (qmail 44538 invoked by uid 500); 12 Sep 2007 13:08:00 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 44516 invoked by uid 500); 12 Sep 2007 13:08:00 -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 44506 invoked by uid 99); 12 Sep 2007 13:08:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Sep 2007 06:07:59 -0700 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 stefan.guggisberg@gmail.com designates 209.85.134.187 as permitted sender) Received: from [209.85.134.187] (HELO mu-out-0910.google.com) (209.85.134.187) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Sep 2007 13:07:58 +0000 Received: by mu-out-0910.google.com with SMTP id w1so233020mue for ; Wed, 12 Sep 2007 06:07:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=TUJH/1AJaeXt4CRzE2gmi9qfZQjQZGeX+wCR81rTkhE=; b=eyDmacijE6pLv118E1AKVz650243DIGyljwopNDeTPu+cYUj7bpI05Kji4hJcoSp27qNQTjtVkbfk7m3jLczJfRTwv8NddujQ1WgTzPexc6Ld7v9ZtpzcW+OdHtAJxuJ+iFydPvRKS4CvAGlzVDxrqgfiOus0VylRrjlnve5YXk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ukivPCHJ7Iw9Bq/pz6AYZCvpbH50WL8QWLCj/pxGk5oZ95CRnP43RisvZlzxVxWvSghFN/Wl+rSARl9rwcgAsWGRdp0TgI7vH1ztzDB9DXPoNryqrIaFxFVkTPHcJVrA4AoBq9DAXGve+YVZ2jgy04dgGWFNLpInVkkAKMEyvc0= Received: by 10.82.190.2 with SMTP id n2mr7627473buf.1189602456446; Wed, 12 Sep 2007 06:07:36 -0700 (PDT) Received: by 10.82.158.11 with HTTP; Wed, 12 Sep 2007 06:07:36 -0700 (PDT) Message-ID: <90a8d1c00709120607h4892412dnb0dcb5d8dd1c1500@mail.gmail.com> Date: Wed, 12 Sep 2007 15:07:36 +0200 From: "Stefan Guggisberg" To: users@jackrabbit.apache.org Subject: Re: lock question In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <90a8d1c00709120520m7a54067cube70eb2732832355@mail.gmail.com> <46E7DAF4.5040704@apache.org> <90a8d1c00709120532r1b9d5906u4850df87bc6e3347@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org On 9/12/07, K=D6LL Claus wrote: > 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 ? you need to retrieve the lock token *before* the session logs out, e.g. by calling Lock lock =3D ....lock(true, false); String token =3D lock.getLockToken(); or // about to log out... String[] tokens =3D session.getLockTokens(); > > thanks > claus > > -----Urspr=FCngliche Nachricht----- > Von: Stefan Guggisberg [mailto:stefan.guggisberg@gmail.com] > 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").u= nlock(); > > > > > > > > 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 > > >