Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 41809 invoked from network); 1 Apr 2008 08:26:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Apr 2008 08:26:54 -0000 Received: (qmail 67525 invoked by uid 500); 1 Apr 2008 08:26:52 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 67493 invoked by uid 500); 1 Apr 2008 08:26:52 -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 67459 invoked by uid 99); 1 Apr 2008 08:26:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Apr 2008 01:26:51 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Apr 2008 08:26:08 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 97DF2234C0B4 for ; Tue, 1 Apr 2008 01:24:24 -0700 (PDT) Message-ID: <1745450643.1207038264621.JavaMail.jira@brutus> Date: Tue, 1 Apr 2008 01:24:24 -0700 (PDT) From: "Marcel Reutegger (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Commented: (JCR-1508) Setting a new property value causes a read of the previous property value In-Reply-To: <34087240.1206919224472.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-1508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12584050#action_12584050 ] Marcel Reutegger commented on JCR-1508: --------------------------------------- While constraints may be checked later (i.e. on save), the specification clearly says in setProperty(String name, Value value): "If the property is multi-valued, a ValueFormatException is thrown." This exception must be thrown immediately, it cannot be deferred to a later point in time when changes are passed to the SPI implementation. > Setting a new property value causes a read of the previous property value > ------------------------------------------------------------------------- > > Key: JCR-1508 > URL: https://issues.apache.org/jira/browse/JCR-1508 > Project: Jackrabbit > Issue Type: Bug > Components: jackrabbit-jcr2spi > Affects Versions: 1.4 > Reporter: David Rauschenbach > > When using JCR2SPI with a custom SPI, getProperty is called when one attempts to set a new property value with disregard to the previous value. The current JCR2SPI implementation causes a getPropertyInfo, which requests the old value from the back-end. This is fundamentally unsound, and kills performance. > An SPI has no choice but to guard against this by returning a PropertyInfo proxy that performs lazy-loading of the value. The problem is that if an error occurs when dereferencing the value, and when performing the lazy-load, JCR2SPI is ill-suited to hande an unchecked exception at such a time. Besides, it is a "hack upon a hack", because JCR2SPI could do this work itself, by making proper use of the SPI functions for requesting property type information. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.