Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9AA6996BF for ; Wed, 25 Jan 2012 23:32:22 +0000 (UTC) Received: (qmail 12568 invoked by uid 500); 25 Jan 2012 23:32:21 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 12399 invoked by uid 500); 25 Jan 2012 23:32:20 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 12388 invoked by uid 99); 25 Jan 2012 23:32:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jan 2012 23:32:20 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [66.94.237.93] (HELO nm28.access.bullet.mail.mud.yahoo.com) (66.94.237.93) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 25 Jan 2012 23:32:11 +0000 Received: from [66.94.237.196] by nm28.access.bullet.mail.mud.yahoo.com with NNFMP; 25 Jan 2012 23:31:50 -0000 Received: from [98.139.244.33] by tm7.access.bullet.mail.mud.yahoo.com with NNFMP; 25 Jan 2012 23:31:50 -0000 Received: from [127.0.0.1] by smtp109.biz.mail.bf1.yahoo.com with NNFMP; 25 Jan 2012 23:31:50 -0000 X-Yahoo-Newman-Id: 450620.44473.bm@smtp109.biz.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: FE3VqjcVM1mAWtSpJHvRs3569HpSDmY1z9hJx8cBTaLlHNC MYhJkOxnN3PcbjQRXWNqIFfyvbbNx7DXXAshbUFNFxTFaexAutT3G4abrbtN c3s5nQMmVO_YTLc8L4kG6ETQXbKf7p0UY6ka8gzSxPYwOekb8zp97wZoV.k5 22zeQM9aUWTmYaxbd4p_hUREr92FnhVa6GQxuv27ROTgQdlf7eTuOxUg1P2I 4BJlil_PLuqUAmUF7gfNJc7gZuoAkDqAAbOg9HcAWErSFI1Mw7E4I.XwCMbw XHalxenyQlYr.Jc0n8DwGanm8yMta8KIuHaFkFLlTxN7SuZe4171u.9mXD2Y GDq06ZX8UIODP09D6L89CmrQQKZPHoG69TfPw02Y4CievoAfhH9nstupwOq7 Sp5r4yW3339dE17HRC6bktFujlI3MmE381UiQHizE4hXL6zlwpg9I89s2aTN 0 X-Yahoo-SMTP: yR2SxyeswBBZtzlgPBfdKkvAwJ0oxw-- Received: from pittsdosx.local (Daniel@216.239.124.44 with plain) by smtp109.biz.mail.bf1.yahoo.com with SMTP; 25 Jan 2012 15:31:50 -0800 PST Message-ID: <4F2090E5.40004@coloraura.com> Date: Wed, 25 Jan 2012 15:31:49 -0800 From: Daniel Pitts User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: Commons Users List Subject: Re: [JCS] ConcurrentModificationException References: <4F1FF507.505@online.no> In-Reply-To: <4F1FF507.505@online.no> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 1/25/12 4:26 AM, Thomas Muller wrote: > Hi, > > I don't know JCS at all, but the exception you get is the result of > one thread updating a collection (in your case a HashMap) whilst > another thread is iterating it. Actually, that exception can (and does) happen in single threaded applications, although that might not be the case here. > This would happen even if the Map was decorated using the > Collections.synchronizedMap( myMap ) facility. To allow /true/ > concurrent access/updates to a Map, the > java.util.concurrent.ConcurrentHashMap (or another class implementing > the ConcurrentMap) must be deployed. Using ConcurrentHashMap may be a heavy weight solution to a simple problem. In general, if you are serializing an object graph, you should not be modifying that graph concurrently. > May there is a way you can force JCS to use another Map implementation > than HashMap? Some factory method somewhere? > This looks like the HashMap is in the Object Model, unrelated to JCS. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org