[Seaside-dev] filters initialization with request context?

Lukas Renggli renggli at gmail.com
Sun Mar 8 08:00:28 UTC 2009


>> Normally you should be able to access the current request context when
>> the filter is initialized.
> that sounds good but I'm not able to reach it. I mean a 'self requestContext'
> while #initializeFilters is signaling.

Indeed, that's not accessible at that point.

We had some discussion when to make it available, because it is also
passed through the lookup chain.

>> It shouldn't be necessary to subclass WASession in Seaside
>> 2.9 anymore.
>>
> I was guessing that but well, I'm migrating one feature at the time :)

The configuration to add session filters is also missing.

> a weird thing I'm seeing right now is that sometimes I get more than one
> transaction executed per request. I'm still investigating yet but seems to me
> like some ensure: could be unwinding more than once.

A link/submit normally creates two requests, as it did in all previous
versions of Seaside. The first one is to process the callbacks, the
second one to perform the rendering. This feature is crucial to make
the back button cleanly work.

> Please correct me if I'm wrong but AFAIK Seaside uses 3 requests at the begining
> and then 2 (a redirect and the request/response).

At the beginning there is just a single render pass, no redirects. If
you use tasks, there is a redirect whenever a new task starts. This
has been fixed in the latest code, but I guess this was after 2.9a2.

> So once session is started, it
> should be commiting "twice per click" (unless redirect can be made outside a
> transaction which is an optimization I didn't investigate yet).

True, normally it shouldn't be necessary to commit after a rendering pass.

> What I see here is that after getting a proper result, 2 o 4 additional commits
> are made for the same (already responded) request. That, at some point, ends up
> making things get lockes and sh*t like that :P

Can you print these requests to the transcript or inspect these? To me
it looks like these requests should not happen. Maybe these are some
resources that are not found?

Cheers,
Lukas

-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the seaside-dev mailing list