Add ApplicationManager constructor without RMI port argument.
This commit is contained in:
parent
6b12ae32ea
commit
0cb7e2a1aa
3 changed files with 16 additions and 5 deletions
|
@ -44,6 +44,17 @@ public class ApplicationManager implements XmlRpcHandler {
|
|||
private long lastModified;
|
||||
private JettyServer jetty = null;
|
||||
|
||||
/**
|
||||
* Creates a new ApplicationManager object.
|
||||
*
|
||||
* @param props the properties defining the running apps
|
||||
* @param server the server instance
|
||||
*/
|
||||
public ApplicationManager(ResourceProperties props,
|
||||
Server server) {
|
||||
this(props, server, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new ApplicationManager object.
|
||||
*
|
||||
|
|
|
@ -86,7 +86,7 @@ public class CommandlineRunner {
|
|||
// init a server instance and start the application
|
||||
Server server = new Server(config);
|
||||
server.init();
|
||||
server.checkAppManager(0);
|
||||
server.checkAppManager();
|
||||
server.startApplication(appName);
|
||||
Application app = server.getApplication(appName);
|
||||
|
||||
|
|
|
@ -616,8 +616,8 @@ public class Server implements Runnable {
|
|||
// create application manager which binds to the given RMI port
|
||||
appManager = new ApplicationManager(appsProps, this, rmiPort.getPort());
|
||||
} else {
|
||||
// create application manager with RMI port 0
|
||||
appManager = new ApplicationManager(appsProps, this, 0);
|
||||
// create application manager without RMI port
|
||||
appManager = new ApplicationManager(appsProps, this);
|
||||
}
|
||||
|
||||
if (xmlrpc != null) {
|
||||
|
@ -677,9 +677,9 @@ public class Server implements Runnable {
|
|||
* Make sure this server has an ApplicationManager (e.g. used when
|
||||
* accessed from CommandlineRunner)
|
||||
*/
|
||||
public void checkAppManager(int port) {
|
||||
public void checkAppManager() {
|
||||
if (appManager == null) {
|
||||
appManager = new ApplicationManager(appsProps, this, port);
|
||||
appManager = new ApplicationManager(appsProps, this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue