From dev-return-13210-apmail-jackrabbit-dev-archive=jackrabbit.apache.org@jackrabbit.apache.org Tue Aug 07 14:06:26 2007 Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 53137 invoked from network); 7 Aug 2007 14:06:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Aug 2007 14:06:24 -0000 Received: (qmail 44714 invoked by uid 500); 7 Aug 2007 14:06:21 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 44676 invoked by uid 500); 7 Aug 2007 14:06:21 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 44639 invoked by uid 99); 7 Aug 2007 14:06:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Aug 2007 07:06:21 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Aug 2007 14:06:14 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2795A7141FE for ; Tue, 7 Aug 2007 07:05:59 -0700 (PDT) Message-ID: <28487014.1186495559136.JavaMail.jira@brutus> Date: Tue, 7 Aug 2007 07:05:59 -0700 (PDT) From: "Julian Reschke (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Commented: (JCR-1040) JCR2SPI: remove node operation missing in submitted SPI batch In-Reply-To: <17872424.1185786113177.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-1040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518157 ] Julian Reschke commented on JCR-1040: ------------------------------------- Hi Angela, I have tried to repro the bug with the test cases in contrib/spi/client, and failed to do so. So what's different over here? The first thing that comes to mind is that in my SPI implementation, all Nodes are referenceable, and the NodeId returned upon NodeInfo.getId() are always built just from the unique id. I just changed that experimentally (now always building the Id from an absolute Path), and sure enough, the tests pass now. So it has to do with the Id format. Does that ring a bell? > JCR2SPI: remove node operation missing in submitted SPI batch > ------------------------------------------------------------- > > Key: JCR-1040 > URL: https://issues.apache.org/jira/browse/JCR-1040 > Project: Jackrabbit > Issue Type: Bug > Components: SPI > Reporter: Julian Reschke > > In JCR2SPI, the following sequence of operations seems to lead to an incorrect SPI batch being submitted: > 1) remove "/a" > 2) add "/a" > 3) add "/a/b" > 4) session.save() > This seems to create an SPI batch where the first remove operation is missing. > Note that the problem only seems to occur when step 3 is part of the sequence. > Full Java source for test: > try { > if (session.getRepository().getDescriptor(Repository.LEVEL_2_SUPPORTED).equals("true")) { > Node testnode; > String name = "delete-test"; > > Node root = session.getRootNode(); > > // make sure it's there > if (! root.hasNode(name)) { > root.addNode(name, "nt:folder"); > session.save(); > } > > // now test remove/add in one batch > if (root.hasNode(name)) { > testnode = root.getNode(name); > testnode.remove(); > // session.save(); // un-commenting this makes the test pass > } > > testnode = root.addNode(name, "nt:folder"); > // add one child > testnode.addNode(name, "nt:folder"); // commenting this out makes the test pass > > session.save(); > } > } finally { > session.logout(); > } > > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.