Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 90262 invoked from network); 17 Sep 2007 14:18:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Sep 2007 14:18:25 -0000 Received: (qmail 64864 invoked by uid 500); 17 Sep 2007 14:18:16 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 64841 invoked by uid 500); 17 Sep 2007 14:18:16 -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 64832 invoked by uid 99); 17 Sep 2007 14:18:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Sep 2007 07:18:16 -0700 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 thomas.tom.mueller@gmail.com designates 64.233.166.178 as permitted sender) Received: from [64.233.166.178] (HELO py-out-1112.google.com) (64.233.166.178) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Sep 2007 14:18:15 +0000 Received: by py-out-1112.google.com with SMTP id u77so3473248pyb for ; Mon, 17 Sep 2007 07:17:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=m8Gc6nBTJpYPvSdyBKIWDnSEVodB0j4bU/WjeTNg98I=; b=aJ6kgBi627UhuFrRYhsE/Ut8vdEA35RrJFHhdvBcEauyfazHU/kWyBAQSJBEFGFzixOCFC4ktXOemNHXqprcgMJmPCwxC2xf41FmNDyydexJJ5Vg0FWJNcnoYlMyKFEf5fIybg7eVXsENs/rtOZtQ02eHGgkiNLa5dbYhlOtIQw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=k9jygaI9G/6921FBWg4SKpc10H6hNQoEeMk0n0bHuo/EMbQ6ePQYovy/X27h5oVSHtkUdkPXaUXGs3ny0S1f3pHp8Ghy0cg7xhNSdPtRpjViViB7EnPRAkUlGr8WXNJkeWYYXbstej4y7txxM9IoH9T4vQRT2jdIHV+B9N13V8M= Received: by 10.64.210.3 with SMTP id i3mr10466826qbg.1190038673605; Mon, 17 Sep 2007 07:17:53 -0700 (PDT) Received: by 10.64.253.5 with HTTP; Mon, 17 Sep 2007 07:17:53 -0700 (PDT) Message-ID: <5f211bd50709170717p2101eb57ibee111a937a4aea8@mail.gmail.com> Date: Mon, 17 Sep 2007 16:17:53 +0200 From: "Thomas Mueller" To: dev@jackrabbit.apache.org Subject: Re: Synchronized methods in ItemManager In-Reply-To: <46EE8843.1080206@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <34B0CDC6176518459F3A96E8C09196B8064C4DD5@darth-vader.nijmegen.gx.nl> <90a8d1c00709140847y2cd6a2d7vede2845e8816db0e@mail.gmail.com> <34B0CDC6176518459F3A96E8C09196B80584B23E@darth-vader.nijmegen.gx.nl> <5f211bd50709140912y3c3f7c6dpd89b5df7e6755283@mail.gmail.com> <34B0CDC6176518459F3A96E8C09196B8064C4E76@darth-vader.nijmegen.gx.nl> <46EE3176.8090101@gmx.net> <46EE3FDD.3050906@gmx.de> <46EE86E8.8040108@gmx.net> <46EE8843.1080206@gmx.de> X-Virus-Checked: Checked by ClamAV on apache.org Hi, > but I'm not convinced that guaranteeing more than JSR-170 > says would be good for interoperability of clients. Maybe trying to detect concurrent access and throwing an exception would be an option? From HashMap javadocs: "Fail-fast iterators throw ConcurrentModificationException on a best-effort basis... the fail-fast behavior of iterators should be used only to detect bugs..." That way we don't have to synchronize, but also reduce the risk of corrupted internal structures on concurrent access within the same session. Thomas