Fixed two bugs:
* Race condition when applications were initialized before the Server constructor had returned and Server.server and thus Server.getServer() was null * Server choking on -i command line option telling the launcher class the Helma install location.
This commit is contained in:
parent
85401cd71f
commit
84c9892a6c
1 changed files with 13 additions and 1 deletions
|
@ -90,6 +90,9 @@ import org.apache.xmlrpc.*;
|
||||||
|
|
||||||
// create new server instance
|
// create new server instance
|
||||||
server = new Server (args);
|
server = new Server (args);
|
||||||
|
|
||||||
|
// start the server main thread
|
||||||
|
server.start ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -137,6 +140,9 @@ import org.apache.xmlrpc.*;
|
||||||
} catch (Exception portx) {
|
} catch (Exception portx) {
|
||||||
usageError = true;
|
usageError = true;
|
||||||
}
|
}
|
||||||
|
} else if (args[i].equals ("-i") && i+1<args.length) {
|
||||||
|
// eat away the -i parameter which is meant for helma.main.launcher.Main
|
||||||
|
i++;
|
||||||
} else
|
} else
|
||||||
usageError = true;
|
usageError = true;
|
||||||
}
|
}
|
||||||
|
@ -291,12 +297,18 @@ import org.apache.xmlrpc.*;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void start () {
|
||||||
// Start running, finishing setup and then entering a loop to check changes
|
// Start running, finishing setup and then entering a loop to check changes
|
||||||
// in the apps.properties file.
|
// in the apps.properties file.
|
||||||
mainThread = new Thread (this);
|
mainThread = new Thread (this);
|
||||||
mainThread.start ();
|
mainThread.start ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void stop () {
|
||||||
|
mainThread = null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The main method of the Server. Basically, we set up Applications and than
|
* The main method of the Server. Basically, we set up Applications and than
|
||||||
|
|
Loading…
Add table
Reference in a new issue