Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 9283 invoked from network); 28 Jul 2006 11:36:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Jul 2006 11:36:52 -0000 Received: (qmail 84201 invoked by uid 500); 28 Jul 2006 11:36:52 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 84043 invoked by uid 500); 28 Jul 2006 11:36:51 -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 84034 invoked by uid 99); 28 Jul 2006 11:36:51 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Jul 2006 04:36:51 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of tobias.strasser@gmail.com designates 64.233.182.185 as permitted sender) Received: from [64.233.182.185] (HELO nf-out-0910.google.com) (64.233.182.185) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Jul 2006 04:36:49 -0700 Received: by nf-out-0910.google.com with SMTP id o25so173869nfa for ; Fri, 28 Jul 2006 04:36:27 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=QnpJdMYKGbO2oOtisQ8m+QqUmXanvdGQaWd6F/XrBaduh5VHWGM32qmmtNd1/HGx755CzcS+Xe8AN0Ci2PuYRZXvLGTVK71AVME88nwL8wHEsQoC3ck4pqMXx3trAh6iTa6rWHhQjz8M8k7vk1QmqXB6f6PoA/Z7f7wwl5HqhXQ= Received: by 10.78.134.12 with SMTP id h12mr156989hud; Fri, 28 Jul 2006 04:36:27 -0700 (PDT) Received: by 10.78.50.18 with HTTP; Fri, 28 Jul 2006 04:36:27 -0700 (PDT) Message-ID: <8be731880607280436t94798e8ofcba36ace8a6bd92@mail.gmail.com> Date: Fri, 28 Jul 2006 13:36:27 +0200 From: "Tobias Bocanegra" Reply-To: tobias.bocanegra@day.com Sender: tobias.strasser@gmail.com To: users@jackrabbit.apache.org Subject: Re: Merge the nodes In-Reply-To: <6A691308CA12C042893815EEB76956E694EA@saas-win.saas.local> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <6A691308CA12C042893815EEB76956E694EA@saas-win.saas.local> X-Google-Sender-Auth: 0203af4d24c41308 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N merge is only used for updating/merging corresponding node in different workspaces that have different base versions. you can't use it to update transient nodes. regards, toby On 7/28/06, Ramesh Devaraj wrote: > Hi > > > > I am not able to merge the nodes. > > > > Unable to perform operation. Session has pending changes. > > at org.apache.jackrabbit.core.NodeImpl.checkSessionHasPending(NodeI= mpl.java:3134) > > > > private static void testMultiSession() throws Exception > > { > > SimpleCredentials creds =3D new SimpleCredentials= ("username", > > "password".toCharArray()); > > Session session =3D repository.login(creds); > > > > SimpleCredentials creds1 =3D new SimpleCredential= s("username", > > "password".toCharArray()); > > Session session1 =3D repository.login(creds1); > > String xpath =3D "customerList/customer/userList/= user"; > > Node nodeToModify =3D getNodeToModify(xpath, sess= ion); > > > > Node nodeToModify1 =3D getNodeToModify(xpath, ses= sion1); > > > > nodeToModify.setProperty("data", "modify by sessi= on"); > > > > nodeToModify1.setProperty("data", "modify by sess= ion1"); > > > > nodeToModify.save(); > > //export(session); > > try > > { > > nodeToModify1.save(); > > > > } catch (javax.jcr.InvalidItemStateException ex) > > { > > > > //NOW I TRY MERGE THE NODES nodeToModi= fy and nodeToModify1 > > > > nodeToModify1.merge("default", true); > > //nodeToModify1.save(); > > > > } > > session.logout(); > > session1.logout(); > > > > } > > > > > > > > http://www.maas.de - Wir integrieren Zukunft > > > > Diese E-Mail enth=E4lt vertrauliche und/oder rechtlich gesch=FCtzte Infor= mationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrt= =FCmlich erhalten haben, informieren Sie bitte sofort den Absender und vern= ichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weiterga= be dieser Mail ist nicht gestattet. > > > > This e-mail may contain confidential and/or privileged information. If yo= u are not the intended recipient (or have received this e-mail in > error) please notify the sender immediately and destroy this e-mail. Any = unauthorized copying, disclosure or distribution of the material in this e-= mail is strictly forbidden. > > > > > > > > > --=20 -----------------------------------------< tobias.bocanegra@day.com >--- Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel T +41 61 226 98 98, F +41 61 226 98 97 -----------------------------------------------< http://www.day.com >---