Great responses and I'm getting some ideas.... Here's some more details: 1. Wait for work a request to arrive 2. Read the EOs needed to process the work request 3. Perform calculations for the work request 4. Save changes 5. Invalidate the application's EO cache 6. Go back to #1. I just create an editing context the normal way, e.g. ec = new EOEditingContext(); This editing context is used through out all these steps (1 thru 6). The EOs needed to process the work request and perform the calculations are read into this editing context. I then save the results and the work request with its complete flag set. The EOs read in step #2 are basically a very deep graph of EOs, with a lot of to-many and to-ones relationships and like I said, it's deep ;-) You can think of these objects as the parameters used for the calculations in step #3. These EOs will not change while the work request is in-progress. Once the calculations are performed and changes are saved to the database I would like to clear the cache. The reason is that I go back to #1 to wait for another work request. But the new work request may reference the same EOs from a previous work request. And the EOs may have been modified in a web application where a user can edit the parameters in those EOs and submit a new work request. I'm still not sure which way to go to invalidate the object cache. Invalidating EOs in object graph would be an option except that the graph is so deep and it may change over time. For example, new relationships may get added to the object model, etc. So the code I write to invalidate the object graph may not be accurate a few weeks from today. :-) I'm leaning towards EOEditingContext's dispose(). Not sure what it will do exactly though. I guess I will have to run some tests to give it a shot. I found this but like I said I'm still not sure which way to go: Let me know if you have some ideas what would be best for my application. Thanks to all who have responded. Ricardo Parada On ago 3, 2006, at 11:36 AM, Ken Anderson wrote:
|
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]
