Christopher Oliver wrote:
Continuations do not require the session. But the session is needed to support cases where you use JS global variables to share data between multiple top level page flows. In your cases, there are no shared variables or else there is only a single page flow. I guess Stefano and Ricardo are arguing that in almost any real application that would not be the case. In Ovidiu's original design you had to explicitly request use of the session in your script. Perhaps we should just turn that around and require you to explicitly request to _not_ use the session:
function mySessionLessFlow() { cocoon.useSession = false; sendPageAndWait("blah.xml"); }
What do you think?
I'll repeat the question:
Is it possible to use application context to share those global variables?
It's possible, but I don't see any benefit over using the session.
The intention is that they are per-user state, so storing them in the session makes sense.
What if those variables *are* global? If they are stored in the session they become local to the current user.
Back to Antonio's suggestion. Can we have a configuration of the flow controller specifying where to store those global variables? Context, session, and request (that should be analogue to "no session", right?) can be possible values.
Where would you specify this, exactly?