incubator-lokahi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tob...@apache.org
Subject svn commit: r412803 - /incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/agent/TMCAgent.java
Date Thu, 08 Jun 2006 17:06:44 GMT
Author: toback
Date: Thu Jun  8 10:06:44 2006
New Revision: 412803

URL: http://svn.apache.org/viewvc?rev=412803&view=rev
Log:
quick fix to ensure the agent starts.

Modified:
    incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/agent/TMCAgent.java

Modified: incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/agent/TMCAgent.java
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/agent/TMCAgent.java?rev=412803&r1=412802&r2=412803&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/agent/TMCAgent.java (original)
+++ incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/agent/TMCAgent.java Thu
Jun  8 10:06:44 2006
@@ -19,6 +19,7 @@
 import org.apache.lokahi.core.common.database.DerbyBroker;
 import org.apache.axis.transport.http.SimpleAxisServer;
 import org.apache.log4j.Logger;
+import org.apache.log4j.xml.DOMConfigurator;
 
 import javax.net.ServerSocketFactory;
 import javax.net.ssl.SSLServerSocketFactory;
@@ -51,18 +52,28 @@
    *             or 'stop'.  All other will cause a help
    *             message to display.
    */
-  public static void main(String[] args) { //todo write the 'bootstrappage'
+  public static void main(String[] args) {
     //check to see if starting or stopping;
-
+    if (args != null && args.length >= 1) {
+      if ("start".equalsIgnoreCase(args[0])) {
     try {
       init();
-      //holding pattern;
+      run = true;
+      while(run) {}
       destroy();
     } catch (IOException e) {
       if (logger.isInfoEnabled()) {
         logger.info("Exception: " + e.getMessage());
       }
     }
+      } else if ("stop".equalsIgnoreCase(args[0])) {
+
+      } else {
+        //help
+      }
+    } else {
+      //help
+    }
   }
 
   /**
@@ -73,8 +84,7 @@
    *         or a property file can't be opened.
    */
   public static void init() throws IOException {
-    //todo init log4j!
-
+    DOMConfigurator.configure("log4j.xml");
     int port = 5665;
     SimpleAxisServer sas = new SimpleAxisServer();
     ServerSocketFactory sf = SSLServerSocketFactory.getDefault();



Mime
View raw message