From: Chuck H. <ch...@gl...> - 2009-04-17 17:50:43
|
On Apr 17, 2009, at 10:31 AM, Dan Grec wrote: > On 17-Apr-09, at 11:13 AM, Chuck Hill wrote: >> On Apr 17, 2009, at 10:06 AM, Dan Grec wrote: >> >>> Hey all, >>> >>> So we're still kicking this idea around, and my brain won't let it >>> rest. >>> >>> We're a little afraid of using the ERXEOAccessUtilities apprach as >>> we really don't want to deal with the object graph being in a >>> funny state. >> >> Your object graph probably already gets in funny states. Running >> multiple instances? Not using the Wonder EO change sync >> framework? Ever get odd error reports that you can't reproduce? > > Hmm - we do have multiple instances, but we are running Wonder EO > change stuff. From time to time we do get > EOObjectNotAvailableException and similar that are strange. You might have your answer there. ;-) >>> So I've been wondering if we can influence the SQL that is >>> generated when EditingContext.saveChanges() is called. >>> At that point, all the notifications have been sent out and all of >>> that stuff. >>> So when it creates the SQL for deletedObjects, instead of going >>> over each EO one at a time and making "delete from foo where id=bar" >>> could it possibly check to see if there are many EOs of the same >>> class and making a "delete from foo where id in "bar,bar2,bar3" >>> type of dealy-o. >>> I also understand that it needs to visit each EO one at a time to >>> call things like EO.willDelete() on them, I'm wondering if it >>> could do all that, then make the one line of SQL and run it... >>> I'm going as deep as I can with Jad, but I'm way over my head. >>> >>> It seems like a pretty nice optimization to me. >>> >>> Is this possible or am I completely off base? >> >> Probably possible, but really, really difficult. You'd need to >> subclass and replace some classes way down in EOAccess. > > Nice to know that one day I might be able to do it. > If the multi row delete failed there might be problems.... > > Now I'm thinking we can still use > ERXEOAccessUtilities.deleteRowsDescribedByQualifier and then just > mark those EO's to be refaulted. Thoughts? I think you would want to invalidate them. BUT that will only help for the instance they are deleted in. Chuck >> >> Chuck >> >> >>> On 16-Apr-09, at 12:08 PM, Chuck Hill wrote: >>> >>>> >>>> On Apr 16, 2009, at 6:30 AM, Vaughan Van Der Merwe wrote: >>>> >>>>> So if we happen to be using multiple instances as well as a >>>>> 'Wonder >>>>> cross-instance synching thingy' we could potentially end up in a >>>>> weird state by using this? >>>> >>>> I think a more correct statement would be that the 'Wonder cross- >>>> instance synching thingy' eliminates (or at least greatly reduces) >>>> weird states and using this can bring them back. If you are not >>>> using >>>> it, you have to deal with the weird states. Or, as I suspect most >>>> people do, just not worry about them. >>>> >>>> Chuck >>>> >>>> >>>>> >>>>> >>>>> On 15-Apr-09, at 4:34 PM, Chuck Hill wrote: >>>>> >>>>>> >>>>>> On Apr 15, 2009, at 3:07 PM, Mike Schrag wrote: >>>>>> >>>>>>>> Wonder's ERXEOAccessUtilities is what you want. This >>>>>>>> bypasses all >>>>>>>> the >>>>>>>> EOF validations and delete rules as well, so be aware of that. >>>>>>> and leaves your object graph in an inconsistent state, so you >>>>>>> need >>>>>>> to >>>>>>> manually refresh it ... >>>>>> >>>>>> Or just not worry about it. :-) If you are running multiple >>>>>> instances >>>>>> and not using the Wonder cross-instance synching thingy, then >>>>>> this is >>>>>> the same situation as EOF processing the deletes in another >>>>>> instance. >>>>>> >>>>>> >>>>>> 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 >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> Stay on top of everything new and different, both inside and >>>>>> around Java (TM) technology - register by April 22, and save >>>>>> $200 on the JavaOne (SM) conference, June 2-5, 2009, San >>>>>> Francisco. >>>>>> 300 plus technical and hands-on sessions. Register today. >>>>>> Use priority code J9JMT32. http://p.sf.net/sfu/p >>>>>> _______________________________________________ >>>>>> Wonder-disc mailing list >>>>>> Won...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/wonder-disc >>>>> >>>>> >>>>> >>>> >>>> -- >>>> 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 >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Stay on top of everything new and different, both inside and >>>> around Java (TM) technology - register by April 22, and save >>>> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. >>>> 300 plus technical and hands-on sessions. Register today. >>>> Use priority code J9JMT32. http://p.sf.net/sfu/p >>>> _______________________________________________ >>>> Wonder-disc mailing list >>>> Won...@li... >>>> https://lists.sourceforge.net/lists/listinfo/wonder-disc >>> >>> ------------------------------------------------------------------------------ >>> Stay on top of everything new and different, both inside and >>> around Java (TM) technology - register by April 22, and save >>> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. >>> 300 plus technical and hands-on sessions. Register today. >>> Use priority code J9JMT32. http://p.sf.net/sfu/p_______________________________________________ >>> Wonder-disc mailing list >>> Won...@li... >>> https://lists.sourceforge.net/lists/listinfo/wonder-disc >> >> -- >> 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 >> >> >> >> >> >> > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p_______________________________________________ > Wonder-disc mailing list > Won...@li... > https://lists.sourceforge.net/lists/listinfo/wonder-disc -- Chuck Hill Senior Consultant / VP Development Come to WOWODC'09 in San Fran this June! http://www.wocommunity.org/wowodc09/ |