[aida] WebSession lastRequest (was Custom request handling howto)
Janko Mivšek
janko.mivsek at eranova.si
Thu Nov 22 01:34:18 CET 2007
Hi Michael,
Michael Rueger wrote:
>> Last request actually is a request currently processed and not a
>> previous one. Well, method name should obviously be better ...Maybe is a
>> time to rename it? Simply to #currentRequest?
>
> I figured that that was the intention.
> But, would it be possible:
> if a second request for the same session came in (e.g the user has two
> browser windows open or another ajax request comes in) before the first
> request is completed that this assumption would be no longer valid?
Yes, you are right. And this is happening also when images are loading
in parallel.
What is interesting that so far that was not a problem but it is very
valuable to know, what is happening here. Thanks to pointing that
potential problem out!
What I'll do is to better comment that method, but let the name stay the
same.
Also, this means that #printWebPageFor: aSession is not reliable enough
and that we really need to add an argument aRequest, to be sure which
request we are actually serving in case of multiple requests at once.
So, let the search for a better solution continue!
Update: I just comment #lastRequest method:
"last request served on that session. It is also current one until
response is sent. Note also that multiple requests can be served at
once! In this case last request will be the one one which
last started! "
Janko
--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si
More information about the Aida
mailing list