* Move initScriptingEngine() and scriptingEngine.updatePrototypes() call inside try statement
* Replace do.. while with wile statement
This commit is contained in:
parent
14f8f1e8d2
commit
4f59be6597
1 changed files with 11 additions and 8 deletions
|
@ -121,11 +121,9 @@ public final class RequestEvaluator implements Runnable {
|
|||
Transactor localrtx = (Transactor) Thread.currentThread();
|
||||
|
||||
try {
|
||||
do { // while (localrtx == rtx);
|
||||
// initialize scripting engine, in case it hasn't been initialized yet
|
||||
initScriptingEngine();
|
||||
// update scripting prototypes
|
||||
scriptingEngine.updatePrototypes();
|
||||
|
||||
// while this thread is serving requests
|
||||
while (localrtx == rtx) {
|
||||
|
||||
// root object reference
|
||||
Object root;
|
||||
|
@ -145,6 +143,11 @@ public final class RequestEvaluator implements Runnable {
|
|||
|
||||
try {
|
||||
|
||||
// initialize scripting engine
|
||||
initScriptingEngine();
|
||||
// update scripting prototypes
|
||||
scriptingEngine.updatePrototypes();
|
||||
|
||||
// Transaction name is used for logging etc.
|
||||
StringBuffer txname = new StringBuffer(app.getName());
|
||||
txname.append(":").append(req.getMethod().toLowerCase()).append(":");
|
||||
|
@ -516,8 +519,8 @@ public final class RequestEvaluator implements Runnable {
|
|||
app.errorCount += 1;
|
||||
app.logError("Error in " + Thread.currentThread(), x);
|
||||
|
||||
// Dump the profiling data to System.err
|
||||
if (app.debug && !(x instanceof ScriptingException)) {
|
||||
// Dump stack trace to System.err in debug mode
|
||||
if (app.debug) {
|
||||
x.printStackTrace();
|
||||
}
|
||||
|
||||
|
@ -545,7 +548,7 @@ public final class RequestEvaluator implements Runnable {
|
|||
|
||||
notifyAndWait();
|
||||
|
||||
} while (localrtx == rtx);
|
||||
}
|
||||
|
||||
} finally {
|
||||
localrtx.closeConnections();
|
||||
|
|
Loading…
Add table
Reference in a new issue