Major clean-up work on Application constructors. Removed some old
options like setting application file extensions etc. Instead now the Application constructors can take arguments for the app and db home directories. Updated helma.main.ApplicationManager and helma.servlet.StandaloneServletClient to the new constructors. TypeManager now has file extensions as static final members.
This commit is contained in:
parent
c044ab86ab
commit
65b8d6b2c4
4 changed files with 121 additions and 87 deletions
|
@ -16,7 +16,6 @@ import helma.framework.core.*;
|
|||
import helma.objectmodel.*;
|
||||
import helma.servlet.*;
|
||||
import helma.util.SystemProperties;
|
||||
// import Acme.Serve.*;
|
||||
import org.mortbay.http.*;
|
||||
import org.mortbay.http.handler.*;
|
||||
import org.mortbay.jetty.servlet.*;
|
||||
|
@ -37,7 +36,6 @@ public class ApplicationManager {
|
|||
private SystemProperties props;
|
||||
private Server server;
|
||||
private long lastModified;
|
||||
// EmbeddedTomcat tomcat;
|
||||
|
||||
public ApplicationManager (int port, File hopHome, SystemProperties props, Server server) {
|
||||
this.port = port;
|
||||
|
@ -104,7 +102,14 @@ public class ApplicationManager {
|
|||
void start (String appName) {
|
||||
Server.getLogger().log ("Building application "+appName);
|
||||
try {
|
||||
Application app = new Application (appName, hopHome, Server.sysProps, Server.dbProps);
|
||||
// check if application and db dirs are set, otherwise go with
|
||||
// the defaults, passing null dirs to the constructor.
|
||||
String appDirName = props.getProperty (appName+".appdir");
|
||||
File appDir = appDirName == null ? null : new File (appDirName);
|
||||
String dbDirName = props.getProperty (appName+".dbdir");
|
||||
File dbDir = dbDirName == null ? null : new File (dbDirName);
|
||||
// create the application instance
|
||||
Application app = new Application (appName, server, appDir, dbDir);
|
||||
applications.put (appName, app);
|
||||
// the application is started later in the register method, when it's bound
|
||||
app.init ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue