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:
hns 2003-02-25 11:59:26 +00:00
parent 85401cd71f
commit 84c9892a6c

View file

@ -90,6 +90,9 @@ import org.apache.xmlrpc.*;
// create new server instance
server = new Server (args);
// start the server main thread
server.start ();
}
/**
@ -137,6 +140,9 @@ import org.apache.xmlrpc.*;
} catch (Exception portx) {
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
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
// in the apps.properties file.
mainThread = new Thread (this);
mainThread.start ();
}
protected void stop () {
mainThread = null;
}
/**
* The main method of the Server. Basically, we set up Applications and than