• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Locking problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Locking problem


  • Subject: Locking problem
  • From: Florijan Stamenkovic <email@hidden>
  • Date: Mon, 13 Oct 2008 16:43:56 -0400

Hi all,

Cross posting this to wonder and WO, as it seems appropriate on both lists.

I tried adapting ERXEC to a JC scenario. I stripped away the factory stuff, the delegate and properties (I made it always autoLock), as well as lock coalescing. However, it does not help. I get deadlocks and exceptions. There are two threads involved, one instance of my WorkerThread class and AWT's event dispatch thread (responsible for GUI painting).

Deadlocks happen this way:
- the worker thread is for some reason halted in EODistributeObjectStore's fetch (EODistributedObjectStore.objectsWithFetchSpecification (EOFetchSpecification, EOEditingContext) line: 499
- the event dispatch thread is getting an object for global ID, and is waiting for a lock release in the editing context


Exceptions happen this way:

on my WorkerThread:
java.lang.IllegalStateException: Illegal Lock usage: unlocking thread not owner.
at com.webobjects.foundation.NSRecursiveLock.unlock (NSRecursiveLock.java:207)
at com.webobjects.eodistribution.client.EODistributedObjectStore.unlock (EODistributedObjectStore.java:71)
at com.webobjects.eocontrol.EOEditingContext.unlockObjectStore (EOEditingContext.java:4753)
at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification( EOEditingContext.java:4118)
at org.wojc.client.JCEC.objectsWithFetchSpecification(JCEC.java:844)
at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification( EOEditingContext.java:4500)
...


or sometimes on AWT's EDT:
java.lang.IllegalStateException: Illegal Lock usage: unlocking thread not owner.
at com.webobjects.foundation.NSRecursiveLock.unlock (NSRecursiveLock.java:207)
at com.webobjects.eodistribution.client.EODistributedObjectStore.unlock (EODistributedObjectStore.java:71)
at com.webobjects.eocontrol.EOEditingContext.unlockObjectStore (EOEditingContext.java:4753)
at org.wojc.client.JCEC.unlockObjectStore(JCEC.java:916)
at com.webobjects.eocontrol.EOCustomObject.willReadRelationship (EOCustomObject.java:1304)
at com.webobjects.eocontrol._EOMutableKnownKeyDictionary$Initializer $_LazyGenericRecordBinding.valueInObject (_EOMutableKnownKeyDictionary.java:560)
at com.webobjects.eocontrol.EOCustomObject.storedValueForKey (EOCustomObject.java:1736)
at com.havaso.dvis.client.eof.eo._Project.users(_Project.java:175)
...




Maybe I screwed up with stripping the ERXEC? I'm attaching the source, maybe somebody can point out the mistake?

Any help would be greatly appreciated,
Flor

Attachment: JCEC.java
Description: Binary data

 _______________________________________________
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

  • Follow-Ups:
    • Re: [Wonder-disc] Locking problem
      • From: Anjo Krank <email@hidden>
    • Re: Locking problem
      • From: Mike Schrag <email@hidden>
  • Prev by Date: A little help here with ajaxupdatecontainer,
  • Next by Date: Re: Locking problem
  • Previous by thread: A little help here with ajaxupdatecontainer,
  • Next by thread: Re: Locking problem
  • Index(es):
    • Date
    • Thread