From: Jeremy R. <jer...@sf...> - 2008-10-28 23:05:11
|
I can't believe you are going to make me say it. It seems that for some reason, the guy who's code I "borrowed" is using sessions in a unique way. (I'm not entirely sure how or why) Anyway, when I asked him if he had any idea why his code worked and mine didn't he suggested that perhaps he was pulling the session out from under me in his original code. With this fresh perspective, I suddenly saw that he had overridden sleep() in the WOComponent that I was using and was calling session.terminate() So the reason my session timed out almost right away was because I was killing it every time the page loaded. Now do you understand my shame? If my boss asks what I was doing all day, it was a learning exercise to understand the request-response flow of a Project Wonder Ajax App. Jeremy On Oct 28, 2008, at 3:51 PM, Chuck Hill wrote: > But but but what was wrong? Inquiring minds want to know! > > > On Oct 28, 2008, at 3:46 PM, Jeremy Rosenberg wrote: > >> The good news is I solved this problem (you can all stop furiously >> searching through your code for an answer for me) >> >> The bad news is, it was all my fault and I am now wracked with shame >> for making you all worry about me. >> >> Thanks for everyone that emailed me with suggestions, I have learned >> much about Project Wonder and even more about reading one's own code >> carefully. (especially when it was stolen from a co-worker) >> >> Jeremy >> >> >> On Oct 28, 2008, at 11:10 AM, Chuck Hill wrote: >> >>> >>> On Oct 28, 2008, at 9:58 AM, Jeremy Rosenberg wrote: >>> >>>> Hey Chuck >>>> >>>> I am extending ERXApplication which as I understand it, includes >>>> everything that ERXAjaxApplication does. >>> >>> Yes, and more. ERXAjaxApplication is the minimum ante to play in >>> this game. You also extend ERXSession then? I'll assume so as >>> other Ajax stuff is working. >>> >>> >>>> Here are all the outputs from dispatchRequest, mostly just css and >>>> js loading, the last one is the request generated when I try to >>>> click the expand node link: >>>> >>>> [2008-10-28 09:41:49,862] - /cgi-bin/WebObjects/ITServices.woa >>>> [2008-10-28 09:41:55,759] - /cgi-bin/WebObjects/ITServices.woa/wa/ >>>> ArcsManager >>> >>> irrelevant log messages removed >>> >>>> >>>> [2008-10-28 09:42:01,458] - /cgi-bin/WebObjects/ITServices.woa/ >>>> ajax/ >>>> xtfPYOVgcrf8B616AfkrGw/ >>>> 0.0.8.1.2.3.1.1.3.1 >>>> .ca_sfu_icat_arcsManager_components_ARCContentPage.1.5.1.0.5.1.1 >>> >>> It is odd that the very first /ajax/ request results in that unable >>> to restore page error. Can you confirm that xtfPYOVgcrf8B616AfkrGw >>> is the session created by the ArcsManager action? >>> >>> That is all that I can think of. >>> >>> Chuck >>> >>> >>>> I'm frustrated by the fact that the same app has another Direct >>>> Action that works just fine using AjaxSubmitButtons to move through >>>> a series of screens, the output for that DA is: >>>> >>>> [2008-10-28 09:48:43,624] INFO >>>> icat.aob.itservices.application.Application.dispatchRequest - /cgi- >>>> bin/WebObjects/ITServices.woa/wa/AccountActivation >>>> (all same css and js as above) >>>> [2008-10-28 09:48:56,795] INFO >>>> icat.aob.itservices.application.Application.dispatchRequest - /cgi- >>>> bin/WebObjects/ITServices.woa/ajax/ >>>> jRIBwIUZjt1c2KIr5vq3P0 >>>> / >>>> 0.0.8.1.2.3.1.1.3.1 >>>> .ca_sfu_icat_acctMgmt_activation_AMAcctActivationContract.5? >>>> __updateID=AcctManagementUpdater&1225212536789 >>>> [2008-10-28 09:48:59,199] INFO >>>> icat.aob.itservices.application.Application.dispatchRequest - /cgi- >>>> bin/WebObjects/ITServices.woa/ajax/ >>>> jRIBwIUZjt1c2KIr5vq3P0 >>>> / >>>> 2.0.8.1.2.3.1.1.3.1 >>>> .ca_sfu_icat_acctMgmt_activation_AMAcctActivationIdentify? >>>> __updateID=AcctManagementUpdater&1225212539195 >>>> [2008-10-28 09:49:01,111] INFO >>>> icat.aob.itservices.application.Application.dispatchRequest - /cgi- >>>> bin/WebObjects/ITServices.woa/ajax/ >>>> jRIBwIUZjt1c2KIr5vq3P0 >>>> / >>>> 3.0.8.1.2.3.1.1.3.1 >>>> .ca_sfu_icat_acctMgmt_activation_AMAcctActivationSetPassword? >>>> __updateID=AcctManagementUpdater&1225212540961 >>>> [2008-10-28 09:49:03,128] INFO >>>> icat.aob.itservices.application.Application.dispatchRequest - /cgi- >>>> bin/WebObjects/ITServices.woa/ajax/ >>>> jRIBwIUZjt1c2KIr5vq3P0 >>>> / >>>> 4.0.8.1.2.3.1.1.3.1 >>>> .ca_sfu_icat_acctMgmt_activation_AMAcctActivationPasswordQuestion? >>>> __updateID=AcctManagementUpdater&1225212543125 >>>> [2008-10-28 09:49:04,354] INFO >>>> icat.aob.itservices.application.Application.dispatchRequest - /cgi- >>>> bin/WebObjects/ITServices.woa/ajax/ >>>> jRIBwIUZjt1c2KIr5vq3P0 >>>> / >>>> 5.0.8.1.2.3.1.1.3.1 >>>> .ca_sfu_icat_acctMgmt_activation_AMAcctActivationDirectoryOption? >>>> __updateID=AcctManagementUpdater&1225212544351 >>>> [2008-10-28 09:49:07,042] INFO >>>> icat.aob.itservices.application.Application.dispatchRequest - /cgi- >>>> bin/WebObjects/ITServices.woa/ajax/ >>>> jRIBwIUZjt1c2KIr5vq3P0 >>>> / >>>> 6.0.8.1.2.3.1.1.3.1 >>>> .ca_sfu_icat_acctMgmt_activation_AMAcctActivationDirectoryOption? >>>> __updateID=AcctManagementUpdater&1225212547039 >>>> >>>> But this might be apples to oranges since I'm using the AjaxTree. >>>> >>>> Jeremy >>>> >>>> On Oct 27, 2008, at 4:57 PM, Chuck Hill wrote: >>>> >>>>> >>>>> On Oct 27, 2008, at 4:39 PM, Jeremy Rosenberg wrote: >>>>> >>>>>> I know, I know, but I goofed off all weekend, so here I am. >>>>> >>>>> But, but that is what weekends are for! >>>>> >>>>> >>>>>> I am calling session() before pageWithName() and the >>>>>> AjaxExamples app runs fine on my local machine (I have been using >>>>>> that as my template) >>>>>> >>>>>> I'm not sure how to grab the request (takeValuesFromRequest >>>>>> doesn't seem to get called) >>>>> >>>>> We really want to see all of them, so override dispatchRequest in >>>>> Application and log out request.uri(). The clue is likely in the >>>>> interweaving of the /wa/, /wo/ and /ajax/ requests. >>>>> >>>>> >>>>>> I checked out the call in firebug and this is the URL it is >>>>>> posting back to: >>>>>> >>>>>> http://sh1016mac1.ucs.sfu.ca:59145/cgi-bin/WebObjects/ITServices.woa/ajax/TSfCSmhGZMIIaq3qb6xMJw/0.0.8.1.2.3.1.1.3.1.ca_sfu_icat_arcsManager_components_ARCContentPage.1.5.1.0.5.1.1 >>>>>> >>>>>> I'm assuming the problem might have to do with all those numbers >>>>>> in the URL, I have a vague recollection of getting session >>>>>> timeout errors because one of my old apps thought I was >>>>>> backtracking or something. >>>>> >>>>> I would not think so. >>>>> >>>>> >>>>>> Am I not doing some ER Magic here that makes the URLs Ajax >>>>>> friendly? >>>>> >>>>> Are you extending ERXAjaxApplication and ERXAjaxSession? >>>>> >>>>> >>>>> Chuck >>>>> >>>>>> >>>>>> On Oct 27, 2008, at 4:26 PM, Chuck Hill wrote: >>>>>> >>>>>>> >>>>>>> On Oct 27, 2008, at 3:55 PM, Jeremy Rosenberg wrote: >>>>>>> >>>>>>>>> >>>>>>>> I'm sure I've seen discussions about problems with sessions >>>>>>>> when using >>>>>>>> Ajax but since I wasn't using Ajax I didn't pay much attention, >>>>>>>> now I >>>>>>>> can find anything about it. >>>>>>> >>>>>>> It is a lovely fall day to be inside playing with Ajax... >>>>>>> >>>>>>> >>>>>>>> I am using and AjaxTree and I can get the top level node to >>>>>>>> display >>>>>>>> but as soon as I click the expand button, it is replaced with >>>>>>>> "Your >>>>>>>> Session has timed out" >>>>>>>> >>>>>>>> I'm on a page that was accessed via Direct Action if that >>>>>>>> makes a >>>>>>>> difference. >>>>>>> >>>>>>> Has the session been created before the page is rendered? If >>>>>>> not, try adding a call to session() to your action before >>>>>>> calling pageWithName(). Does that make any difference? >>>>>>> >>>>>>> >>>>>>>> If anyone can point me to a post about this issue or similar >>>>>>>> issues >>>>>>>> that would be most appreciated. >>>>>>>> >>>>>>>> I'm using WO5.3 with Wonder 5-5.3 >>>>>>> >>>>>>> >>>>>>> Ajax request use a special page cache. I've seen a few >>>>>>> unreproducible cases that I think may have been caused by >>>>>>> running out of Ajax page cache (2 levels deep). Can you log out >>>>>>> the requests that the app gets and post them? >>>>>>> >>>>>>> Have you looked at the AjaxExamples app? Does the tree example >>>>>>> there do the same thing for you? >>>>>>> >>>>>>> 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 >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> = >>>>>> = >>>>>> = >>>>>> = >>>>>> = >>>>>> = >>>>>> ================================================================= >>>>>> Jeremy Rosenberg >>>>>> Application Developer >>>>>> Institutional, Collaborative, and Academic Technologies >>>>>> Computing Services >>>>>> Simon Fraser University >>>>>> Burnaby, BC, Canada V5A 1S6 >>>>>> >>>>>> Email: jer...@sf... >>>>>> >>>>>> "ICAT: Of great importance to your academic success and SFU's >>>>>> global achievement" >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> -- >>>>> 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 >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>>> = >>>> = >>>> = >>>> = >>>> =================================================================== >>>> Jeremy Rosenberg >>>> Application Developer >>>> Institutional, Collaborative, and Academic Technologies >>>> Computing Services >>>> Simon Fraser University >>>> Burnaby, BC, Canada V5A 1S6 >>>> >>>> Email: jer...@sf... >>>> >>>> Help me raise money as I grow a Mustache for Men's Health >>>> https://www.movember.com/ca/donate/donate-details.php?action=sponsorlink®o=1478796&country=ca >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> >>> -- >>> 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 >>> >>> >>> >>> >>> >>> >> >> = >> = >> ===================================================================== >> Jeremy Rosenberg >> Application Developer >> Institutional, Collaborative, and Academic Technologies >> Computing Services >> Simon Fraser University >> Burnaby, BC, Canada V5A 1S6 >> >> Email: jer...@sf... >> >> Help me raise money as I grow a Mustache for Men's Health >> https://www.movember.com/ca/donate/donate-details.php?action=sponsorlink®o=1478796&country=ca >> >> >> >> >> >> >> >> >> >> >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win >> great prizes >> Grand prize is a trip for two to an Open Source event anywhere in >> the world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> 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 > > > > > > ======================================================================= Jeremy Rosenberg Application Developer Institutional, Collaborative, and Academic Technologies Computing Services Simon Fraser University Burnaby, BC, Canada V5A 1S6 Email: jer...@sf... Help me raise money as I grow a Mustache for Men's Health https://www.movember.com/ca/donate/donate-details.php?action=sponsorlink®o=1478796&country=ca |