From be96b27a881ca49f459bd0f322813f797dd544c0 Mon Sep 17 00:00:00 2001 From: hns Date: Wed, 11 Jan 2006 10:45:39 +0000 Subject: [PATCH] * Delay beginning of transaction a bit so we are able to avoid starting a transaction for internal invocations of functions which do not exist. Fixes bug 436. --- src/helma/framework/core/RequestEvaluator.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/helma/framework/core/RequestEvaluator.java b/src/helma/framework/core/RequestEvaluator.java index 7bfc6128..944cf093 100644 --- a/src/helma/framework/core/RequestEvaluator.java +++ b/src/helma/framework/core/RequestEvaluator.java @@ -163,9 +163,6 @@ public final class RequestEvaluator implements Runnable { txname.append(":").append(req.getMethod().toLowerCase()).append(":"); txname.append((error == null) ? req.getPath() : "error"); - // begin transaction - localrtx.begin(txname.toString()); - String action = null; root = app.getDataRoot(); @@ -179,6 +176,9 @@ public final class RequestEvaluator implements Runnable { switch (reqtype) { case HTTP: + // begin transaction + localrtx.begin(txname.toString()); + if (session.message != null) { // bring over the message from a redirect res.message = session.message; @@ -382,6 +382,9 @@ public final class RequestEvaluator implements Runnable { case XMLRPC: case EXTERNAL: + // begin transaction + localrtx.begin(txname.toString()); + try { currentElement = root; @@ -445,7 +448,6 @@ public final class RequestEvaluator implements Runnable { // see if a valid node was returned if (thisObject == null) { reqtype = NONE; - abortTransaction(); done = true; break; } @@ -463,10 +465,11 @@ public final class RequestEvaluator implements Runnable { if (!functionexists) { // function doesn't exist, nothing to do here. reqtype = NONE; - abortTransaction(); } else { - try { + // begin transaction + localrtx.begin(txname.toString()); + try { // reset skin recursion detection counter skinDepth = 0;