Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 12153 invoked from network); 21 Jan 2011 15:43:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Jan 2011 15:43:31 -0000 Received: (qmail 50924 invoked by uid 500); 21 Jan 2011 15:43:31 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 50668 invoked by uid 500); 21 Jan 2011 15:43:28 -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 50660 invoked by uid 99); 21 Jan 2011 15:43:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jan 2011 15:43:27 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of monkiki@gmail.com designates 209.85.214.42 as permitted sender) Received: from [209.85.214.42] (HELO mail-bw0-f42.google.com) (209.85.214.42) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jan 2011 15:43:20 +0000 Received: by bwz13 with SMTP id 13so1532598bwz.1 for ; Fri, 21 Jan 2011 07:42:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=dzyOhVYudTYSDEhaovMjAa7yXtggjbFLRTXpAKtAUZU=; b=jux9/8PExzktos7hVaYeOx8O6TkPEAISa4TwzosM8xdUBBmfN01ZoSLWxlio6uYHaZ msxqu5i4MGsrDq+av+3gD61qRog49Ysk65c+r4KB1zt1ufXpQFOqRL49OHrtTUw7HqfK Qkv4cAgOEdEDiDUvhEa6g4KbAo1LL1fYDtQjE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=QBiP0GsJNwJBS6cZ4JRFKY6Oryp64/PoPYZzd5kK2Gx/oewyfszskNGUh6IlMySR59 vszlF2TIVsCNiyyLF7QUnDWGrSH2gPX1t/Z6GeH3cKzuYF4xPK66ec01Tpa1RJlgZIe3 6899Zkf9xPVeORwRi4/UvMtk8awRSsi6KZJXs= MIME-Version: 1.0 Received: by 10.204.102.193 with SMTP id h1mr766259bko.149.1295624578718; Fri, 21 Jan 2011 07:42:58 -0800 (PST) Received: by 10.204.103.136 with HTTP; Fri, 21 Jan 2011 07:42:58 -0800 (PST) In-Reply-To: References: Date: Fri, 21 Jan 2011 16:42:58 +0100 Message-ID: Subject: Re: remove a locked node. From: Paco Avila To: users@jackrabbit.apache.org Content-Type: multipart/alternative; boundary=001636c5a4c4c6dc83049a5d1a39 X-Virus-Checked: Checked by ClamAV on apache.org --001636c5a4c4c6dc83049a5d1a39 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable See http://jackrabbit.apache.org/api/2.1/org/apache/jackrabbit/core/NodeImpl.ht= ml#lock%28boolean,%20boolean%29 . On Fri, Jan 21, 2011 at 2:06 PM, Rojas Buitrago, Sergio wr= ote: > I'm using jackrabbit 2.1.2. > > First, with an user "A" execute this code: > > // Bloqueamos el nodo > > String ruta =3D nodo.getPath(); > logger.debug("Obtenido path del nodo original: " + > ruta); > String usuario =3D > J_OperacionesSesion.getUsuarioAutentificado(); > logger.debug("Obtenido usuario autentificado: " + > usuario); > > J_OperacionesSesion.getLockManagerPrincipal().lock(ruta, false, > false, Long.MAX_VALUE, usuario); > logger.debug("Nodo original bloqueado"); > session.save(); > > > In other moment an user "B" execute this code: > > nodo.remove(); //this is the locked node > session.save(); > > Thanks and regards. > > Sergio Rojas Buitrago > Desarrollo Software > Gesti=F3n Documental > > Ronda de Toledo s/n > 13003. Ciudad Real > Espa=F1a > T +34 926 27 08 49 > Ext: 237849 > > > srojas@indra.es > www.indra.es > > > > > -----Mensaje original----- > De: Paco Avila [mailto:monkiki@gmail.com] > Enviado el: viernes, 21 de enero de 2011 13:59 > Para: users@jackrabbit.apache.org > Asunto: Re: remove a locked node. > > Then a exception should be thrown. Which Jackrabbit version are you using= ? > Also helps posting a piece of code which reproduce the issue. > > On Fri, Jan 21, 2011 at 1:33 PM, Rojas Buitrago, Sergio >wrote: > > > I know. > > > > I'm trying to remove with a user that is not the lock owner. > > > > > > Sergio Rojas Buitrago > > Desarrollo Software > > Gesti=F3n Documental > > > > Ronda de Toledo s/n > > 13003. Ciudad Real > > Espa=F1a > > T +34 926 27 08 49 > > Ext: 237849 > > > > > > srojas@indra.es > > www.indra.es > > > > > > > > > > -----Mensaje original----- > > De: Paco Avila [mailto:monkiki@gmail.com] > > Enviado el: viernes, 21 de enero de 2011 13:31 > > Para: users@jackrabbit.apache.org > > Asunto: Re: remove a locked node. > > > > The lock owner can modify the node. > > > > On Fri, Jan 21, 2011 at 1:21 PM, Rojas Buitrago, Sergio > >wrote: > > > > > Hi all. > > > > > > > > > > > > I have a problem with the locked nodes. > > > > > > > > > > > > When I try to remove a locked node, the operation node.remove() doesn= 't > > > throw the LockException. > > > > > > > > > > > > I supposed that if a node is locked no operations could be realized > over > > > the node. > > > > > > > > > > > > Somebody can help me ? > > > > > > > > > > > > Thanks and regards. > > > > > > > > > > > > *Sergio Rojas Buitrago* > > > Desarrollo Software > > > Gesti=F3n Documental > > > > > > Ronda de Toledo s/n > > > 13003. Ciudad Real > > > Espa=F1a > > > > > > T +34 926 27 08 49 > > > > > > Ext: 237849 > > > > > > > > > > > > srojas@indra.es > > > www.indra.es > > > > > > [image: indra] > > > > > > > > > > > > ------------------------------ > > > Este correo electr=F3nico y, en su caso, cualquier fichero anexo al > mismo, > > > contiene informaci=F3n de car=E1cter confidencial exclusivamente diri= gida a > > su > > > destinatario o destinatarios. Si no es vd. el destinatario indicado, > > queda > > > notificado que la lectura, utilizaci=F3n, divulgaci=F3n y/o copia sin > > > autorizaci=F3n est=E1 prohibida en virtud de la legislaci=F3n vigente= . En el > > caso > > > de haber recibido este correo electr=F3nico por error, se ruega notif= icar > > > inmediatamente esta circunstancia mediante reenv=EDo a la direcci=F3n > > > electr=F3nica del remitente. > > > Evite imprimir este mensaje si no es estrictamente necesario. > > > > > > This email and any file attached to it (when applicable) contain(s) > > > confidential information that is exclusively addressed to its > > recipient(s). > > > If you are not the indicated recipient, you are informed that reading= , > > > using, disseminating and/or copying it without authorisation is > forbidden > > in > > > accordance with the legislation in effect. If you have received this > > email > > > by mistake, please immediately notify the sender of the situation by > > > resending it to their email address. > > > Avoid printing this message if it is not absolutely necessary. > > > > > > > > > > > -- > > OpenKM > > http://www.openkm.com > > http://www.guia-ubuntu.org > > > > Este correo electr=F3nico y, en su caso, cualquier fichero anexo al mis= mo, > > contiene informaci=F3n de car=E1cter confidencial exclusivamente dirigi= da a > su > > destinatario o destinatarios. Si no es vd. el destinatario indicado, > queda > > notificado que la lectura, utilizaci=F3n, divulgaci=F3n y/o copia sin > > autorizaci=F3n est=E1 prohibida en virtud de la legislaci=F3n vigente. = En el > caso > > de haber recibido este correo electr=F3nico por error, se ruega notific= ar > > inmediatamente esta circunstancia mediante reenv=EDo a la direcci=F3n > > electr=F3nica del remitente. > > Evite imprimir este mensaje si no es estrictamente necesario. > > > > This email and any file attached to it (when applicable) contain(s) > > confidential information that is exclusively addressed to its > recipient(s). > > If you are not the indicated recipient, you are informed that reading, > > using, disseminating and/or copying it without authorisation is forbidd= en > in > > accordance with the legislation in effect. If you have received this > email > > by mistake, please immediately notify the sender of the situation by > > resending it to their email address. > > Avoid printing this message if it is not absolutely necessary. > > > > > > -- > OpenKM > http://www.openkm.com > http://www.guia-ubuntu.org > > Este correo electr=F3nico y, en su caso, cualquier fichero anexo al mismo= , > contiene informaci=F3n de car=E1cter confidencial exclusivamente dirigida= a su > destinatario o destinatarios. Si no es vd. el destinatario indicado, qued= a > notificado que la lectura, utilizaci=F3n, divulgaci=F3n y/o copia sin > autorizaci=F3n est=E1 prohibida en virtud de la legislaci=F3n vigente. En= el caso > de haber recibido este correo electr=F3nico por error, se ruega notificar > inmediatamente esta circunstancia mediante reenv=EDo a la direcci=F3n > electr=F3nica del remitente. > Evite imprimir este mensaje si no es estrictamente necesario. > > This email and any file attached to it (when applicable) contain(s) > confidential information that is exclusively addressed to its recipient(s= ). > If you are not the indicated recipient, you are informed that reading, > using, disseminating and/or copying it without authorisation is forbidden= in > accordance with the legislation in effect. If you have received this emai= l > by mistake, please immediately notify the sender of the situation by > resending it to their email address. > Avoid printing this message if it is not absolutely necessary. > --=20 OpenKM http://www.openkm.com http://www.guia-ubuntu.org --001636c5a4c4c6dc83049a5d1a39--