Re: Fetching data in WOLongResponsePage
Re: Fetching data in WOLongResponsePage
- Subject: Re: Fetching data in WOLongResponsePage
- From: Chuck Hill <email@hidden>
- Date: Tue, 2 Sep 2008 12:33:42 -0700
On Aug 29, 2008, at 9:43 PM, Art Isbell wrote:
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.
It might have been. Mike has worked with this recently, maybe he has
an idea. Mike?
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).
Yes, the API gets a bit annoying down there.
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.
Yes, it should return a properly initialized EO as long as the EC will
accept a snapshot from the time you registered it.
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!
You are welcome, though I don't think they did much good.
Chuck
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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