ContinuationsRhino ContinuationsRhino continuations allow to capture the state of a complete running script to be resumed later on. http://wiki.apache.org/cocoon/RhinoWithContinuations Rhino continuations only work in interpreter mode with the compiler disabled, so make sure that you have the following in your app.properties:
While adding continuation and callback support to existing Helma releases has been a bit of a hack, recent Helma snapshots have added features to make that easier, namely the introduction of req.uri and req.actionHandler. The following script is a first prototype for adding Continuation support to the Helma 1.7 web framework.
This adds the following static methods to the Continuation constructor:
And although continuations work best with POST forms and ordinary links, if you must use GET forms, there also is:
Here's an example action that makes use of this framework:
This action displays three pages: the first renders a form, the second a link, and the third will show a message containing the string entered in the first page. Remember that for continuation support to work, you must call Continuation.resume() in onRequest():
When running the example, you will notice that the continuations have the same URI path as the original action, just with a
This has the great benefit that trying to run a non-existing continuation (either because the link has been passed outside the originating session, or because the session has expired, or because the client does not support cookies) will actually result in the right action being invoked - it will simply result in the action to be started from the beginning. So in order to detect all these cases, it is sufficient to test for a
As of 2008/02/08, serialization issues in combination with Continuations and Javascript functions in general have been fixed in Subversion, so it's no longer a problem to use continuations in combination with persistent sessions. Jetty ContinuationsJetty continuations are a mechanism to keep HTTP connections pending without having a Java thread associated with the request. http://docs.codehaus.org/display/JETTY/Continuations This is not a "real" continuation as this isn't supported by Java. Instead, it relies on "that all actions taken by a filter or servlet before a call to suspend(long) are either idempotent (can be retried) or are made conditional on isPending() so they are not performed on retried requests". http://jetty.mortbay.com/apidocs/org/mortbay/util/ajax/Continuation.html Jetty continuations are a means to allow AJAX polling without a thread penalty. Pages linking to this page: Continuations for the masses, Helma 1.6.2 Changelog |
navigation
Download
Community
Weblog
Mailing Lists
IRC Channel
Documentation
Introductions
Tools
Reference
Project
Roadmap
Bug Reporting
Source
Helma NG Wiki
Wiki
Tags
Updates
Related Projects
Sites using Helma
Shop
search
tags for this page
all tags
Tagsapps (1) bugs (2) class (1) community (2) compatibility (1) concurrency (1) continuations (2) Documentation (5) Documentation ORM (0) dogfood (1) formatting (1) gobi (1) helma (6) helma 1.6 (13) helma 1.7 (8) helma 2 (13) helma ng (7) hopobject (1) html (1) inheritance (5) introspection (1) java (2) javascript (5) jetty (1) JSDoc (1) lazy (1) marius person (1) metaprogramming (2) modules (3) oop (1) organization (2) ORM (2) parsing (1) project (2) projects (1) prototype (1) Rabbit (2) REPL (1) rhino (4) roadmap (3) shell (1) shop (0) Skin Rendering (5) Snippets (1) source svn (1) sugar (3) templates (13) testing (4) Tobi (7) tobi repl shell introspection (0) xml (1) Pages linking to this page: Wiki Overview Text Draft pages linking here
|