Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 45319 invoked from network); 24 Jan 2011 09:39:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Jan 2011 09:39:31 -0000 Received: (qmail 88314 invoked by uid 500); 24 Jan 2011 09:39:31 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 87950 invoked by uid 500); 24 Jan 2011 09:39: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 87942 invoked by uid 99); 24 Jan 2011 09:39:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Jan 2011 09:39:27 +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 srojas@indra.es designates 94.126.240.15 as permitted sender) Received: from [94.126.240.15] (HELO mailhost1.indra.es) (94.126.240.15) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Jan 2011 09:39:23 +0000 Received: from MADARRHUB04.indra.es (172.22.204.69) by MADARREDGE02.indra.es (192.168.14.157) with Microsoft SMTP Server (TLS) id 8.2.234.1; Mon, 24 Jan 2011 10:38:45 +0100 Received: from MADARRMAILBOX05.indra.es ([fe80::b993:2845:bc5:1614]) by MADARRHUB04.indra.es ([::1]) with mapi; Mon, 24 Jan 2011 10:38:59 +0100 From: "Rojas Buitrago, Sergio" To: "users@jackrabbit.apache.org" Date: Mon, 24 Jan 2011 10:38:55 +0100 Subject: RE: remove a locked node. Thread-Topic: remove a locked node. Thread-Index: Acu5gfWc10AetkytRTa85aI79gbbEQCJx9xA Message-ID: References: In-Reply-To: Accept-Language: es-ES Content-Language: es-ES X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: es-ES Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Hello. I have see the link and tried to make the lock and unlock with the Node obj= ect. First, the lock and unlock methods of Node are deprecated. Second, I have the same problems that I had with LockManager methods. the lock created looks to belong to the session that created it instead to = the user that created it. I say this because when I try to remove the lock (unlock) with the same use= r that created it, but in a different session, the application Throws a LockException that says: javax.jcr.lock.LockException: Node not locked by session: 1241350d-3e5d-401= d-a04d-72351a3886da Thanks and regards. Sergio. -----Mensaje original----- De: Paco Avila [mailto:monkiki@gmail.com] Enviado el: viernes, 21 de enero de 2011 16:43 Para: users@jackrabbit.apache.org Asunto: Re: remove a locked node. 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. > -- 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, qu= eda notificado que la lectura, utilizaci=F3n, divulgaci=F3n y/o copia sin a= utorizaci=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) confide= ntial information that is exclusively addressed to its recipient(s). If you= are not the indicated recipient, you are informed that reading, using, dis= seminating and/or copying it without authorisation is forbidden in accordan= ce with the legislation in effect. If you have received this email by mista= ke, please immediately notify the sender of the situation by resending it t= o their email address. Avoid printing this message if it is not absolutely necessary.