Re: Concurrency Issue
Re: Concurrency Issue
- Subject: Re: Concurrency Issue
- From: Mike Schrag <email@hidden>
- Date: Wed, 7 Apr 2010 08:20:34 -0400
Definitely the underlying cause for the exception, but as far as what triggered this event, that's a tougher one. It doesn't really make sense to me, actually. The only API that actually mutates EOObjectStore's userInfo dict is setUserInfoForKey, which isn't called anywhere in the code. Are you using this method in your own code? All the other accesses of EOObjectStore's userInfo result in copies, so I'm not sure who actually modified the thing underneath you. Definitely there is a locking bug in this code, though. Either it needs to be under the standard objectstore lock (which EOUtilities isn't respecting), or it needs to be synchronized (which it's not).
ms
On Apr 7, 2010, at 7:24 AM, Andrew Lindesay wrote:
> (Mike - 20hrs ago)
>> random wo tip: iterating keys on NSDictionary = copy, iterating keys on HashMap = no copy. if you change dict=>map, beware ConcurrentModExc
>
> ^^^ What a co-incidence... probably related issue. I guess there's no easy fix for this other than lodging a radar.
>
>> I thought I'd ask if anybody else has had any experience with this one?
>>
>>> java.util.ConcurrentModificationException
>>> at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
>>> at java.util.HashMap$KeyIterator.next(HashMap.java:828)
>>> at com.webobjects.foundation.NSDictionary.<init>(NSDictionary.java:369)
>>> at com.webobjects.foundation.NSDictionary.<init>(NSDictionary.java:397)
>>> at com.webobjects.eocontrol.EOObjectStore.userInfo(EOObjectStore.java:347)
>>> at com.webobjects.eoaccess.EOModelGroup.modelGroupForObjectStoreCoordinator(EOModelGroup.java:795)
>>> at com.webobjects.eoaccess.EOUtilities.modelGroup(EOUtilities.java:1045)
>>> at com.webobjects.eoaccess.EOUtilities.databaseContextForModelNamed(EOUtilities.java:809)
>
> ___
> Andrew Lindesay
> www.silvereye.co.nz
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden