• 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: Editing Context lock/unlock question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Editing Context lock/unlock question


  • Subject: Re: Editing Context lock/unlock question
  • From: Chuck Hill <email@hidden>
  • Date: Sun, 21 Nov 2004 10:55:22 -0800

Hi Kieran,

1. This is a practical solution, excepting the locking problems that you
note.  You might also want to consider a peer EC with a nested EC per page
(or one shared across all tbe pages).  This would allow you to save the
nested EC to detect validation error before moving onto the next page
without actually saving to the object store.

2. Yes, the EC needs to be locked during _all_ EO most definately including
binding synchronization.

For the lowest effort solution to locking and unlocking at the right times,
look at the MultiECLockManager on www.wocode.com


Chuck

At 08:43 AM 21/11/2004 -0500, Kieran Kelleher wrote:
>>>>
Up to now I used default EC. In my new app, I am using peer EC's for task
based "wizard" work .... create the EC, step through the half dozen wizard
pages updating the EC, and at the last wizard  page save the EC and dispose
of it. Thus if the user does not complete the wizard, cancels the wizard or
navigates somewhere else, it all gets garbage collected.

The EC gets created in the first WOComponent of the wizard, and I pass its
reference to the nextPage as the user moves through the wizard pages. The
session does not know about this EC at all.

Question #1: Is this a practical design pattern or is there a better way?

Question #2:
With regards lock/unlocking this EC, I can put (lock/try EO API
stuff/finally unlock) around code where I manipulate EO's, however what
happens when page values are synchronized via bindings directly into EO's
in this EC? Must I lock/unlock this EC while the response-request loop is
updating EO's in this peer EC?

Any guidance appreciated?

-Kieran


________________________________________________________________
Dev Config = OS X 10.3.5 / Java 1.4.2_05 /  WO 5.2.3 / XCode v1.5 / MySQL
4.0.20 / Connector-J 3.0.11
Deploy Config = OS X 10.3.5 Server / Java 1.4.2_05 / WO 5.2.3 / MySQL
4.0.20 / Connector-J 3.0.11
My Blog: http://webobjects.webhop.org/


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
.net

This email sent to email@hidden<<<<


--

Chuck Hill                                 email@hidden
Global Village Consulting Inc.             http://www.global-village.net
 _______________________________________________
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: 
 >Editing Context lock/unlock question (From: Kieran Kelleher <email@hidden>)

  • Prev by Date: session timeouts in servlet deployment (true WAR)
  • Next by Date: Re: EOF inserts PK automatically
  • Previous by thread: Editing Context lock/unlock question
  • Next by thread: session timeouts in servlet deployment (true WAR)
  • Index(es):
    • Date
    • Thread