cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject Re: [Flow] Scope and Sessions
Date Tue, 17 Jun 2003 21:35:26 GMT
Reinhard Pötz wrote:

>Today I tried to find out how sessions and flow work together:
>
>1. If my tests are correct the global scope of a flow only 
>   lives as long as the session which the flow is tied to is 
>   active.
>
Once you have called "cocoon.createSession()", this is true. Otherwise, 
a new global scope is created for each request.

>   So if the session expires or you use another client to 
>   continue a 'waiting' function you only have access to the 
>   local scope within the flow function.
>
Yep.

>2. All scripts within a <map:script>...></> part share the
>   same global context. If you want to share more objects
>   you need another scope (request, session, context).
>
Yep (AFAIK)

>Is this description correct? If yes is this the intended behaviour? 
>
Yes !

>>From a technical point of view, are there any other possiblities of implementing the
JavaScript global scope.
>
Sure. Technically, all is possible !

>If so has there ever been a community decision (vote) which of these possibilities is
best? 
>

I don't remember of a formal vote about associating the global scope to 
sessions, but this seems very natural as the global scope can be thought 
of as the permanent part of the application state, i.e. it is common to 
the various functions contained in the script. And most often, 
application state is tied to the user context which is the session.

>I'm only asking because I'm curious - no offense to anybody!
>
Hey, asking is not offending ;-)

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



Mime
View raw message