r9414 - helma/helma/trunk/src/helma/main

[email protected]
Newsgroups gmane.comp.java.helma.cvs
Message-ID <[email protected]>
Author: hannes
Date: 2008-12-11 16:08:54 +0100 (Thu, 11 Dec 2008)
New Revision: 9414

Modified:
   helma/helma/trunk/src/helma/main/ApplicationManager.java
   helma/helma/trunk/src/helma/main/CommandlineRunner.java
   helma/helma/trunk/src/helma/main/Server.java
Log:
Add ApplicationManager constructor without RMI port argument.

Details at http://dev.helma.org/trac/helma/changeset/9414

Modified: helma/helma/trunk/src/helma/main/ApplicationManager.java
===================================================================
--- helma/helma/trunk/src/helma/main/ApplicationManager.java	2008-12-11 13:58:38 UTC (rev 9413)
+++ helma/helma/trunk/src/helma/main/ApplicationManager.java	2008-12-11 15:08:54 UTC (rev 9414)
@@ -49,6 +49,17 @@
      *
      * @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.
+     *
+     * @param props the properties defining the running apps
+     * @param server the server instance
      * @param port The RMI port we're binding to
      */
     public ApplicationManager(ResourceProperties props,

Modified: helma/helma/trunk/src/helma/main/CommandlineRunner.java
===================================================================
--- helma/helma/trunk/src/helma/main/CommandlineRunner.java	2008-12-11 13:58:38 UTC (rev 9413)
+++ helma/helma/trunk/src/helma/main/CommandlineRunner.java	2008-12-11 15:08:54 UTC (rev 9414)
@@ -86,7 +86,7 @@
         // 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);
 

Modified: helma/helma/trunk/src/helma/main/Server.java
===================================================================
--- helma/helma/trunk/src/helma/main/Server.java	2008-12-11 13:58:38 UTC (rev 9413)
+++ helma/helma/trunk/src/helma/main/Server.java	2008-12-11 15:08:54 UTC (rev 9414)
@@ -616,8 +616,8 @@
                 // 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 @@
      * 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);
         }
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.