}
public void handleContinuation(String id, List params,
Environment environment) throws Exception
{
WebContinuation wk = continuationsMgr.lookupWebContinuation(id);
if (wk == null) {
/*
* Throw an InvalidContinuationException to be handled inside the
* <map:handle-errors> sitemap element.
*/
throw new InvalidContinuationException("The continuation ID " + id + " is invalid.");
}
Context context = Context.enter();
context.setOptimizationLevel(OPTIMIZATION_LEVEL);
context.setGeneratingDebug(true);
context.setCompileFunctionsWithDynamicScope(true);
// Obtain the continuation object from it, and setup the
// FOM_Cocoon object associated in the dynamic scope of the saved
// continuation with the environment and context objects.
Continuation k = (Continuation)wk.getContinuation();
Scriptable kScope = k.getParentScope();
synchronized (kScope) {
FOM_Cocoon cocoon = (FOM_Cocoon)kScope.get("cocoon", kScope);
cocoon.pushCallContext(this, environment, manager,
serviceManager, avalonContext,