• 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: A WOLongResponsePage that _sometimes_ seems to create a deadlock
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A WOLongResponsePage that _sometimes_ seems to create a deadlock


  • Subject: Re: A WOLongResponsePage that _sometimes_ seems to create a deadlock
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 9 May 2005 09:37:32 -0700

I'll repeat Anjo's warning because it is well worth repeating. :-) IIRC, Apple's D2W pages are notoriously bad for doing this. At the very, very least you are going to need an isLocked flag to avoid over locking or over unlocking. But it is best to use ERXEC or the MultiECLockManager which handle this in an altogether safer way.

Chuck


On May 6, 2005, at 9:03 AM, Anjo Krank wrote:


Am 06.05.2005 um 16:56 schrieb Kaj Hejer:

    public void awake() {
        super.awake();
        if (editingContext != null && isPerformActionFinished) {
            editingContext.lock();  //line 103
        }
    }

Never, *EVER* lock ECs in awake and sleep without some safety measure like ERXEC or this other thing of which I cant remember the name. You are not in the least guaranteed that the calls balance!




--
Practical WebObjects - a book for intermediate WebObjects developers who want to increase their overall knowledge of WebObjects, or those who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects




_______________________________________________
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


References: 
 >A WOLongResponsePage that _sometimes_ seems to create a deadlock (From: Kaj Hejer <email@hidden>)
 >Re: A WOLongResponsePage that _sometimes_ seems to create a deadlock (From: Chuck Hill <email@hidden>)
 >Re: A WOLongResponsePage that _sometimes_ seems to create a deadlock (From: Kaj Hejer <email@hidden>)
 >Re: A WOLongResponsePage that _sometimes_ seems to create a deadlock (From: Anjo Krank <email@hidden>)

  • Prev by Date: Re: cache in memory
  • Next by Date: Re: A WOLongResponsePage that _sometimes_ seems to create a deadlock
  • Previous by thread: Re: A WOLongResponsePage that _sometimes_ seems to create a deadlock
  • Next by thread: Re: A WOLongResponsePage that _sometimes_ seems to create a deadlock
  • Index(es):
    • Date
    • Thread