Re: Unlocking via Application.dispatchRequest()
Re: Unlocking via Application.dispatchRequest()
- Subject: Re: Unlocking via Application.dispatchRequest()
- From: Mike Schrag <email@hidden>
- Date: Fri, 1 Sep 2006 15:24:00 -0400
You might want to look at Project Wonder and ERXEC before you spend
too much time on this ...
ms
On Sep 1, 2006, at 11:19 AM, John Pollard wrote:
Can anyone pick fault in this Editing Context locking scheme, which
is based on the fact that we want to lock just one EC (which may
vary) per request that comes in:
When an EC is first created in a thread, or an existing EC first
accessed for use, lock it and record the fact somewhere in
Application, keyed on Thread.currentThread()
Wrap the content of Application.dispatchRequest in a try...finally
and in the finally, check if the currentThread has locked an EC and
if so unlock.
This seems to have the advantage of being able to apply the lock in
just the bit of code used to create ECs or to access existing ones
and even better, to always do the unlock in just one place. I don't
need to worry if it was a DA request, whether a Session exists etc.
I enforce only one lock call, so only one unlock call is needed.
Thanks for any advice.
_______________________________________________
WebObjects-dev mailing list
email@hidden
http://www.omnigroup.com/mailman/listinfo/webobjects-dev
_______________________________________________
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