Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BD1B1C002 for ; Fri, 25 May 2012 13:30:23 +0000 (UTC) Received: (qmail 32561 invoked by uid 500); 25 May 2012 13:30:23 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 32532 invoked by uid 500); 25 May 2012 13:30:23 -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 32523 invoked by uid 99); 25 May 2012 13:30:23 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 May 2012 13:30:23 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 2CE8E141887 for ; Fri, 25 May 2012 13:30:23 +0000 (UTC) Date: Fri, 25 May 2012 13:30:22 +0000 (UTC) From: "Ard Schrijvers (JIRA)" To: dev@jackrabbit.apache.org Message-ID: <1034836519.1836.1337952623186.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Created] (OCM-49) ObjectContentManagerImpl should not use workspace copy and move but rather do it through the jcr session MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Ard Schrijvers created OCM-49: --------------------------------- Summary: ObjectContentManagerImpl should not use workspace copy and move but rather do it through the jcr session Key: OCM-49 URL: https://issues.apache.org/jira/browse/OCM-49 Project: Jackrabbit OCM Issue Type: Improvement Reporter: Ard Schrijvers Assignee: Ard Schrijvers Fix For: 2.0.0 The OCM interface has the following javadocs for 'save' : /** * Save all modifications made by the object content manager * * @throws ObjectContentManagerException * when it is not possible to save all pending operation into * the JCR repo */ public void save() throws ObjectContentManagerException; In my opinion, this implies that a remove, insert, update, copy and move all are not persisted until the save is being called. This is the case for remove, insert and update, but not for copy and move: They are instant due to the workspace copy / move. Imo, these should be replaced. The workspace move results in *every* confusing problems. For example currently with workspace move below works: ocm.insert(a); ocm.save(); ocm.move("/source", "/result"); assertFalse(ocm.objectExists("/source")); But, if before the move you fetch the 'source' node (setting it to null, refreshing jcr session etc etc does not help) ocm.insert(a); ocm.save(); // due to fetching node here, the unit test start to fail!! Node n = ocm.getSession().getNode("/source"); ocm.move("/source", "/result"); assertFalse(ocm.objectExists("/source")); -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira