* 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.
This commit is contained in:
hns 2006-01-11 10:45:39 +00:00
parent e7bca045d1
commit be96b27a88

View file

@ -163,9 +163,6 @@ public final class RequestEvaluator implements Runnable {
txname.append(":").append(req.getMethod().toLowerCase()).append(":"); txname.append(":").append(req.getMethod().toLowerCase()).append(":");
txname.append((error == null) ? req.getPath() : "error"); txname.append((error == null) ? req.getPath() : "error");
// begin transaction
localrtx.begin(txname.toString());
String action = null; String action = null;
root = app.getDataRoot(); root = app.getDataRoot();
@ -179,6 +176,9 @@ public final class RequestEvaluator implements Runnable {
switch (reqtype) { switch (reqtype) {
case HTTP: case HTTP:
// begin transaction
localrtx.begin(txname.toString());
if (session.message != null) { if (session.message != null) {
// bring over the message from a redirect // bring over the message from a redirect
res.message = session.message; res.message = session.message;
@ -382,6 +382,9 @@ public final class RequestEvaluator implements Runnable {
case XMLRPC: case XMLRPC:
case EXTERNAL: case EXTERNAL:
// begin transaction
localrtx.begin(txname.toString());
try { try {
currentElement = root; currentElement = root;
@ -445,7 +448,6 @@ public final class RequestEvaluator implements Runnable {
// see if a valid node was returned // see if a valid node was returned
if (thisObject == null) { if (thisObject == null) {
reqtype = NONE; reqtype = NONE;
abortTransaction();
done = true; done = true;
break; break;
} }
@ -463,10 +465,11 @@ public final class RequestEvaluator implements Runnable {
if (!functionexists) { if (!functionexists) {
// function doesn't exist, nothing to do here. // function doesn't exist, nothing to do here.
reqtype = NONE; reqtype = NONE;
abortTransaction();
} else { } else {
try { // begin transaction
localrtx.begin(txname.toString());
try {
// reset skin recursion detection counter // reset skin recursion detection counter
skinDepth = 0; skinDepth = 0;