entries.put(ContinuationManagerContext.class, this);
return new StandardEnvironment(super.getChildEnvironment(), entries);
}
protected void action(Path path, InputData input, OutputData output) throws Exception {
AtomicResponseHelper arUtil = new AtomicResponseHelper();
arUtil.wrapOutput((ServletOverridableOutputData)output);
try {
if (isContinuationRunning()) {
log.debug("Routing request through standard continuation.");
continuation._getService().action(path, input, output);
}
if (!isContinuationRunning()) {
arUtil.rollback();
Path scope = output.getScope();
try {
try {
log.debug("Routing request through the continuation.");
childService._getService().action(path, input, output);
}
finally {
output.restoreScope(scope);
}
}
catch (Exception e) {
if (continuation == null)
throw e;
arUtil.rollback();
continuation._getService().action(null, input, output);
}
}
}
finally {
arUtil.commit();
}
}