Re: EO Being Faulted After ERXEC.saveChanges

Michael Hast <[email protected]> Mon, 28 Oct 2013 12:03:39 -0700
Newsgroups gmane.comp.web.webobjects.wonder-disc
Message-ID <[email protected]>
Hi Chuck:

Thanks for the pointer. Unfortunately I did not find any observation of 
the objectChanged… Notifications and no implementation of did(has)Saved 
methods. I experimented with the _objectsChangedInStore method in ERXEC. 
If I comment out the call to super._objectsChangedInStore everything 
works just fine. This is just weird. I also tried to use 
EOEditingContext instead of ERXEC, but that caused other issues. I don't 
know what else I can look at. Hmmmmmm.

	/**
	 * Overridden so add a bugfix from Lenny Marks
	 */
	@Override
	public void _objectsChangedInStore(NSNotification nsnotification) {
		ERXEnterpriseObject.FlushCachesProcessor.perform(this, (NSArray) 
nsnotification.userInfo().objectForKey("objects"));
		if (savingChanges) {
			synchronized (queuedNotifications) {
				queuedNotifications.addObject(nsnotification);
			}
		}
		else {
			System.out.println("2 _objectsChangedInStore: "+__updatedObjects);
			super._objectsChangedInStore(nsnotification);
			System.out.println("3 _objectsChangedInStore: "+__updatedObjects);
		}
	}

Here is my System.out log for the 2 statements above.

2 _objectsChangedInStore: ({values = {writingPrompt = 
<com.webobjects.foundation.NSKeyValueCoding$Null>; testItem = "<TestItem 
626287d3 _EOIntegralKeyGlobalID[TestItem (java.lang.Integer)609047]>"; 
testItemResponse = "null"; hotSpotIDs = 
<com.webobjects.foundation.NSKeyValueCoding$Null>; testItemResponse2 = 
"null"; testItemResponse3 = "null"; testItemResponse4 = "null"; 
testItemResponse5 = "null"; testItemResponse6 = "null"; graphPoints = 
<com.webobjects.foundation.NSKeyValueCoding$Null>; testItemResponse8 = 
"null"; responseIDs = <com.webobjects.foundation.NSKeyValueCoding$Null>; 
testItemResponse7 = "null"; studentTestSession = "<StudentTestSession 
21dc7b3e _EOIntegralKeyGlobalID[StudentTestSession 
(java.lang.Integer)6075690]>"; shortResponse = ".15"; }; this = 
"<StudentTestSessionResponse 6dbe2b55 
_EOIntegralKeyGlobalID[StudentTestSessionResponse 
(java.lang.Integer)147543548]>"; }, {values = {timesTaken = 4; 
noResponse = 1; bookMarkedDate = 2013-10-28 16:23:55 Etc/GMT; 
studentTestSessionID = 6075690; studentClassNumber = 
<com.webobjects.foundation.NSKeyValueCoding$Null>; studentClassName = 
<com.webobjects.foundation.NSKeyValueCoding$Null>; elapsedTime = 
<com.webobjects.foundation.NSKeyValueCoding$Null>; locationFID = 913; 
teacherName = <com.webobjects.foundation.NSKeyValueCoding$Null>; 
scansheetInfo = <com.webobjects.foundation.NSKeyValueCoding$Null>; 
studentTestResultData = 
"<com.webobjects.eocontrol._EOCheapCopyMutableArray 73cbc5cb 
(<EOAccessArrayFaultHandler studentTestResultData 
_EOIntegralKeyGlobalID[StudentTestSession 
(java.lang.Integer)6075690]>)>"; school = "<School 3dcf2ef6 
_EOIntegralKeyGlobalID[School (java.lang.Integer)913]>"; testSession = 
"<TestSession 121f34d0 _EOIntegralKeyGlobalID[TestSession 
(java.lang.Integer)71810]>"; grade = "<Grade 6d14382d 
(com.webobjects.eoaccess.EOAccessFaultHandler 
_EOIntegralKeyGlobalID[Grade (java.lang.Integer)8])>"; student = 
"<Student 3f363271 _EOIntegralKeyGlobalID[Student 
(java.lang.Integer)3272]>"; dateTaken = 2013-10-28 18:56:53 Etc/GMT; 
homeroom = <com.webobjects.foundation.NSKeyValueCoding$Null>; 
studentClassSection = <com.webobjects.foundation.NSKeyValueCoding$Null>; 
studentTestSessionResponses = ("<StudentTestSessionResponse 7d6ac92e 
_EOIntegralKeyGlobalID[StudentTestSessionResponse 
(java.lang.Integer)147543547]>", "<StudentTestSessionResponse 6dbe2b55 
_EOIntegralKeyGlobalID[StudentTestSessionResponse 
(java.lang.Integer)147543548]>", "<StudentTestSessionResponse 600f11bc 
(com.webobjects.eoaccess.EOAccessFaultHandler 
_EOIntegralKeyGlobalID[StudentTestSessionResponse 
(java.lang.Integer)147543549])>", "<StudentTestSessionResponse 7d557ee8 
(com.webobjects.eoaccess.EOAccessFaultHandler 
_EOIntegralKeyGlobalID[StudentTestSessionResponse 
(java.lang.Integer)147543550])>"); studentGrowthPercentile = 
<com.webobjects.foundation.NSKeyValueCoding$Null>; }; this = 
"<StudentTestSession 21dc7b3e _EOIntegralKeyGlobalID[StudentTestSession 
(java.lang.Integer)6075690]>"; })

3 _objectsChangedInStore: (<java.lang.Class(6dbe2b55) Fault 
_EOIntegralKeyGlobalID[StudentTestSessionResponse 
(java.lang.Integer)147543548]>, <java.lang.Class(21dc7b3e) Fault 
_EOIntegralKeyGlobalID[StudentTestSession (java.lang.Integer)6075690]>)

Michael

On 10/25/2013 7:38 PM, Chuck Hill wrote:
> Check for objectChanged... Notifications and did(has)Saved methods.
>
>> On Oct 25, 2013, at 3:53 PM, "Michael Hast" <[email protected]> wrote:
>>
>> Hi:
>>
>> I am trying to troubleshoot/performance enhance a WebObjects project not
>> developed by us. I see the same fetch reoccurring after the user saves
>> changes to the database. The application is using the latest Wonder
>> frameworks and ERXEC's are used.
>>
>> I am running the application in the debugger and after each saveChanges
>> my main EO (StudentTestSession) is faulted. is there an automatic
>> trigger in ERXEC's saveChanges that could trigger this? Any ERX
>> properties that could trigger this?
>>
>> Michael
>> --
>> Tel: (602) 279-4600 ext: 635
>> Desert Sky Software: www.desertsky.com
>>      Specializing in the Development and Hosting of
>>      e-Business Applications.
>>
>> ------------------------------------------------------------------------------
>> October Webinars: Code for Performance
>> Free Intel webinars can help you accelerate application performance.
>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
>> the latest Intel processors and coprocessors. See abstracts and register >
>> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Wonder-disc mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/wonder-disc

-- 
Tel: (602) 279-4600 ext: 635
Desert Sky Software: www.desertsky.com
     Specializing in the Development and Hosting of
     e-Business Applications.

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk