• 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
Re: Unable to release locks when using MultiECLockManager
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unable to release locks when using MultiECLockManager


  • Subject: Re: Unable to release locks when using MultiECLockManager
  • From: Art Isbell <email@hidden>
  • Date: Tue, 29 Apr 2008 14:56:42 -1000

On Apr 29, 2008, at 2:24 PM, Owen McKerrow wrote:

Sorry all, I should have specified that further. Has anyone seen it whilst using MultiECLockManager ?


No, but you must use MultiECLockManager correctly. Are you invoking MultiECLockManager.unlock() in Session.sleep() before any statement that might throw an exception that would result in MultiECLockManager.unlock() not being invoked?

I let MultiECLockManager handle the locking/unlocking of all editing contexts that aren't WOSession's defaultEditingContext() and that aren't stored in a local variable (i.e., the scope editing context is limited to the method in which it is created). I lock/unlock local editing contexts myself ensuring that they're unlocked:

EOEditingContext ec = new EOEditingContext();
ec.lock();
try {
	// Do stuff
}
finally {
	ec.unlock();
}

	This approach hasn't resulted in any illegal lock usage exceptions.

Aloha,
Art

_______________________________________________
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: Unable to release locks when using MultiECLockManager
      • From: Owen McKerrow <email@hidden>
References: 
 >Unable to release locks when using MultiECLockManager (From: Owen McKerrow <email@hidden>)
 >Re: Unable to release locks when using MultiECLockManager (From: Owen McKerrow <email@hidden>)

  • Prev by Date: Re: Unable to release locks when using MultiECLockManager
  • Next by Date: Re: Unable to release locks when using MultiECLockManager
  • Previous by thread: Re: Unable to release locks when using MultiECLockManager
  • Next by thread: Re: Unable to release locks when using MultiECLockManager
  • Index(es):
    • Date
    • Thread