* Call onStart() directly in calling thread rather than in scheduler
to make sure it completed before the application gets mounted.
This commit is contained in:
parent
618d64b6d9
commit
6af4923d92
1 changed files with 11 additions and 11 deletions
|
@ -430,6 +430,17 @@ public final class Application implements IPathElement, Runnable {
|
|||
public synchronized void start() {
|
||||
starttime = System.currentTimeMillis();
|
||||
|
||||
// as first thing, invoke global onStart() function
|
||||
RequestEvaluator eval = null;
|
||||
try {
|
||||
eval = getEvaluator();
|
||||
eval.invokeInternal(null, "onStart", RequestEvaluator.EMPTY_ARGS);
|
||||
} catch (Exception xcept) {
|
||||
logError("Error in " + name + "onStart()", xcept);
|
||||
} finally {
|
||||
releaseEvaluator(eval);
|
||||
}
|
||||
|
||||
worker = new Thread(this, "Worker-" + name);
|
||||
worker.setPriority(Thread.NORM_PRIORITY + 1);
|
||||
worker.start();
|
||||
|
@ -1456,17 +1467,6 @@ public final class Application implements IPathElement, Runnable {
|
|||
*/
|
||||
public void run() {
|
||||
|
||||
// as first thing, invoke global onStart() function
|
||||
RequestEvaluator eval = null;
|
||||
try {
|
||||
eval = getEvaluator();
|
||||
eval.invokeInternal(null, "onStart", RequestEvaluator.EMPTY_ARGS);
|
||||
} catch (Exception xcept) {
|
||||
logError("Error in " + name + "onStart()", xcept);
|
||||
} finally {
|
||||
releaseEvaluator(eval);
|
||||
}
|
||||
|
||||
// interval between session cleanups
|
||||
long lastSessionCleanup = System.currentTimeMillis();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue