On 1-Aug-06, at 10:42 PM, Owen McKerrow wrote: How is the active editing context "swapping" ? In fact where is if getting this active editing context from ?
Hi Owen,
Are you still having trouble with this? I've not seen a resolution posted so I'm guessing that you are! :-)
I needed a diversion the other day so I looked into this and even created a small test case. (I'm running OSX 10.4.7, Xcode 2.3, WOF 5.3.1 (with Xcode 2.3 updates), Java 1.4.2_09) While I can't reproduce the problem that you're having, I do have some thoughts.
First off, you're tripping a fault that it's the resolution of that fault which is causing the problem. You might be able to eliminate the problem by manually resolving the fault yourself rather then letting EOF do it for you.
I suspect that the 'Mysterious' EOEditingContext is the one associated with the EOAccessArrayFaultHandler when it was created. that would explain why it's not one that you've ever seen before in your code.
What I'm really having trouble envisioning, is what code has managed to initiate a operation on the EODatabaseContext and thus be the 'active' EC at the time when your fault fires... One was I supposed this could happen is if a previous database operation has not completed properly and thus had not cleared the 'active' EOEditingContext setting. I wasn't able to get my little test application to fail in this way.
For your test cases, are they separate sessions on the same WOF instance or are they separate instances? Since EODatabase's snapshotForSourceGlobalID() is actually doing a fetch for your second case, I'm assuming that your running a single instance and that the snapshot from transaction one has been marked invalid. That would explain why the fault is being fetched and not resolved from memory.
Also, you should try -DEOAdaptorDebugEnabled=true and look at the log of what's going on. Specifically, I'd be interested to see what operations are happening in relation to the exception.
Anyway, good luck resolving this! Mark
Are you at WWDC? If so, I'd be happy to help with this!
|