Re: Force Refresh Relation
Re: Force Refresh Relation
- Subject: Re: Force Refresh Relation
- From: Kieran Kelleher <email@hidden>
- Date: Thu, 20 Sep 2007 10:36:03 -0400
Touché! Yes, I guess I asked for that :-)
If the data is volatile and changing by some background process that
WO does not know about then is this what the shared ec was designed
for? I thought the shared ec was for stuff like look up tables that
never change (well between application restarts anyway), for example,
a list of country entities, or ZIP Code entities.
From the discussions over the years on this list here I got the
impression that the shared ec was best avoided due to its strange
behaviour issues....
http://lists.apple.com/archives/webobjects-dev/2007/Apr/msg00437.html
http://lists.apple.com/archives/webobjects-dev/2004/Feb/msg00157.html
Looking at the API, it does state the overall purpose of the Shared
EC as being for readonly objects that don't change between restarts,
however down further in the intro, it gives a procedure for updating
objects that are normally in the Shared EC.
http://developer.apple.com/documentation/WebObjects/Reference/API/com/
webobjects/eocontrol/EOSharedEditingContext.html
..... but this still applies to making changes in the app so
notifications happen.
So, I guess the only way to "know" if shared ec stuff has changed in
the db is to refresh them all, right .... or perhaps something
special like a background process looping through all shared objects
at a non-CPU hogging pace refreshing them over time?
I stopped using the shared EC a while back after seeing the
discussions .... I only used it for 2 lookup entities and the record
counts were low, so it was not like I had an impelling reason to use
it ...... Lachlan, you probably have a good reason since I notice you
participated in a few threads about Shared ec.
http://sourceforge.net/mailarchive/message.php?msg_id=7FECF679-
email@hidden
Anyway, I hope you can solve your challenge.
Cheers, Kieran
On Sep 20, 2007, at 12:24 AM, Alan Ward wrote:
"don't use the shared EC" is very much like "use
ec.invalidateAllObjecs()"
Both are not good advice.
Alan
On Sep 19, 2007, at 9:16 PM, Lachlan Deck wrote:
On 20/09/2007, at 12:40 PM, Kieran Kelleher wrote:
Yes, don't use the shared ec at all.
That's a sledge hammer approach... as it works well otherwise....
so I'm looking for info specifically on the aforementioned
situation. i.e., why it's occurring rather than just 'don't use...'.
Thanks.
On Sep 19, 2007, at 9:34 PM, Lachlan Deck wrote:
On 20/09/2007, at 12:01 AM, Alan Ward wrote:
On Sep 19, 2007, at 5:00 AM, Kieran Kelleher wrote:
I think that was referred to as the "sledge hammer" approach
in a WWDC session a few years ago ;-)
Indeed. You should never need to do that.
I wish that was true for the shared ec. I'm finding that unless
I invalidateAllObjects on the shared ec that it fails to release
old objects and fails to fetch new objects added to the database
by another app.
Any ideas on this?
with regards,
_______________________________________________
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