Re: Fetching data in WOLongResponsePage
Re: Fetching data in WOLongResponsePage
- Subject: Re: Fetching data in WOLongResponsePage
- From: Art Isbell <email@hidden>
- Date: Fri, 29 Aug 2008 18:43:21 -1000
On Aug 29, 2008, at 6:25 PM, Chuck Hill wrote:
What is the fetchTimestamp of the EC in the main thread? If it is
older than the objects being returned and their related objects, it
should not fetch.
I increased the default fetch timestamp lag to see whether that was
the problem. Doing so didn't help although I think I'll test again
using the default 1 hour fetch timestamp lag.
Hmmm, slow fetches... are you using a second EOF stack in the long
response page? This will have a different cache of snapshots than
the main thread. You would need to register the snapshots in the
main thread's object store to avoid re fetching in that case.
I originally tried creating a second EOF stack which would be ideal
because fetches in the main thread by other sessions wouldn't be
blocked. I was experiencing the same refetches, so I assumed that I
had not registered the snapshots correctly. But maybe that wasn't the
problem.
My first attempt was to return the EODatabase snapshots from the long
response thread EOF stack and register them in the main thread EOF
stack. But the values in the NSDictionary returned by
EODatabase.snapshots() are a protected type,
EODatabase._DatabaseRecord (if I recall) which isn't what
EODatabase.registerSnapshots() expects (grumble). It expects the
values to be NSDictionaries, so a class cast exception was thrown.
However, EODatabase.snapshotForGlobalID() does return a snapshot that
makes EODatabase.registerSnapshots() happy.
So after registering these snapshots, should
EOEditingContext.faultForGlobalID() return an EO with non-null
values? That wasn't occurring which made me suspect that I was
missing some crucial step.
I would prefer using a second EOF stack if I can figure out how to
transfer the fetched data so that refetching won't occur.
Otherwise I am stumped.
I certainly am. Thanks for your suggestions!
Aloha,
Art
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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