Re: To Many Fault and Locking
Re: To Many Fault and Locking
- Subject: Re: To Many Fault and Locking
- From: Hunter Hillegas <email@hidden>
- Date: Mon, 17 May 2004 08:45:07 -0700
Let me elaborate a bit...
This component is setup by a direct action. There is no session. I was
under the impression that to use the MultiECLockManager I need to be
using session derived ECs. Maybe I should look at the code again.
The value is grabbed by a a binding in the template, on the page, not
from code in my .java file - so then, how do I get the EC locked at
that point? The EO is fetched via the EC in the constructor after
having some work done by the DirectAction. Once I leave the
constructor, I unlock my EC. Then, WOF pulls the value from the EO and
I get the locking exception.
So, I guess I'm not sure how to lock the EO since the exception is
being generated while in my Java code, but from the component template.
Does that make more sense?
On May 16, 2004, at 10:16 PM, Chuck Hill wrote:
The best thing is to keep the EC locked. You should not do anything
to any
eo in an ec unless the ec is locked. See the MultiECLockManager on
WOCode
for a good solution to this.
Chuck
At 01:19 PM 16/05/2004 -0700, you wrote:
I have an entity, Hotel, that has a toMany relationship with another
entity, Restaurant.
I fetch a hotel via a locked editing context. It fetches fine.
I assume at this point that the restaurants() relationship hasn't been
fetched, it is a fault.
Later on in the same component, I call restaurants().count(). This
triggers all of the locking exceptions, as at that point the EC that
the object is in has been unlocked... So... Is the best thing to do
here to fire that fault before I unlock the EC, right after I do the
fetch?
Hunter
_______________________________________________
WebObjects-dev mailing list
email@hidden
http://www.omnigroup.com/mailman/listinfo/webobjects-dev
--
Chuck Hill email@hidden
Global Village Consulting Inc.
http://www.global-village.net
_______________________________________________
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.