Re: locking editing context
Re: locking editing context
- Subject: Re: locking editing context
- From: email@hidden
- Date: Tue, 18 Feb 2003 09:23:11 -0500
Hi Brent,
This is the document that scared me when I received WO 5.2 beta.
Reading it, is seems that I need to lock editing contexts even in the
case of fault resolution. Since fault resolution can happen anytime,
then the only sensible way of managing locking is to lock any editing
context we use at WOComponent.awake time and unlock them in
WOComponent.sleep. In that case, enabling concurrent request handling
does not help unless a significant part of our application's request
make no access to EOs at all.
This may not be a big deal for traditional WebObjects applications,
since they are designed to have a large number of JVM instances
running. However, servlets are designed to handle concurrent requests.
The TI departments I know of will get upset when asked to manage
hundreds of JVM instances on a Tomcat site. They will quickly conclude
that WebObjects is not designed properly. And since the servlet flavor
of WebObjects was develop exactly for such environments, we have a
problem.
Also, manually locking/unlocking objects is error prone. And the
resulting errors are the most difficult to fix since they only occur
randomly on heavy load. I really feel that WebObjects should use Java
synchronization to ensure safe OE access without requiring manual
coding. But this would probably mean a considerable rework of
WebObjects...
Serge
Le lundi, 17 fiv 2003, ` 14:22 America/Montreal, Brent Shank a icrit :
> Perhaps this will help:
>
> http://developer.apple.com/techpubs/webobjects/Enterprise_Objects/
> Concurrency/chapter_11_section_3.html
>
> Also, the WebObjects examples are a good source of sample code that
> locks and unlocks ec's when needed.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.