Return-Path: Delivered-To: apmail-incubator-cayenne-user-archive@locus.apache.org Received: (qmail 89912 invoked from network); 24 Apr 2006 14:57:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Apr 2006 14:57:19 -0000 Received: (qmail 3709 invoked by uid 500); 24 Apr 2006 14:57:10 -0000 Delivered-To: apmail-incubator-cayenne-user-archive@incubator.apache.org Received: (qmail 3691 invoked by uid 500); 24 Apr 2006 14:57:10 -0000 Mailing-List: contact cayenne-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cayenne-user@incubator.apache.org Delivered-To: mailing list cayenne-user@incubator.apache.org Received: (qmail 3682 invoked by uid 99); 24 Apr 2006 14:57:10 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Apr 2006 07:57:10 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [129.195.254.32] (HELO sim.hcuge.ch) (129.195.254.32) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Apr 2006 07:57:09 -0700 Received: from [129.195.133.24] ([129.195.133.24]) by sim.hcuge.ch (Switch-2.2.8/Switch-2.2.8) with ESMTP id k3OEq3p15130 for ; Mon, 24 Apr 2006 16:52:03 +0200 (MEST) Message-ID: <444CE728.1070402@sim.hcuge.ch> Date: Mon, 24 Apr 2006 16:56:40 +0200 From: Arnaud GARCIA User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: cayenne-user@incubator.apache.org Subject: ConcurrentModificationException ... References: <4446D597.4060206@maine.rr.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello, I have a problem with multithreaded access with cayenne ... My model is a simple one to many relationship (an Order can have many series) In my main thread I add new series to an Order : order.addToSeries(aSerie); But in another thread I am doing an Iteration over the series which launch an exception: List series = order.getSeries(); for (Iterator iter = series.iterator(); iter.hasNext();) { ... } Exception in thread "Thread-985" java.util.ConcurrentModificationException at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:617) Is there a way to lock/synchronize the addToSeries or the iter.hasNext() .... what is the good way to do this with cayenne ? many thanks, Arnaud