Vadim Gritsenko wrote:
Sylvain Wallez wrote:
Vadim Gritsenko wrote:
AFAIK, that is already the behavior. If you invalidate the parent, it invalidates all of its children.
Yes, if it has them. But the problem here is that he has got no children. You have to stick all the different web continuations trees generated by showForm calls into the root, and only then you can invalidate them.
Can you elaborate why you need to invalidate a collection of continuation trees?
To implement "Exit" button for an application which will be run on public computers (in libraries, etc), to invalidate all personal information collected during use of application.
What about Session.invalidate()? Isn't what you're looking for a special ContinuationManager that stores continuations in the session?
But they are not necessarily in session. BTW, how do place them in session?
Can't they all belong to the same hierarchy?
That's my goal; that's why I use addChild. Works like a charm :-)
Yeah, but it's a fake hierarchy.
showForm is also fake hierarchy: Javascript Continuation objects are totally independent. The only reason to wrap them into WebContinuation is to give them an URI, and the only reason to put those WebContinuations into an artificial tree is to invalidate them together, right?
Doesn't it have some bad side effects, since a continuation contains the call stack and variables? What happens when a script returns from a top-level function that has artificially be given a parent?
Nothing special. What you expected to happen?
Vadim
