activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1029831 - /activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/Main.scala
Date Mon, 01 Nov 2010 20:53:29 GMT
Author: chirino
Date: Mon Nov  1 20:53:29 2010
New Revision: 1029831

URL: http://svn.apache.org/viewvc?rev=1029831&view=rev
Log:
Catch the case where the main cannot find the apollo management web app.

Modified:
    activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/Main.scala

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/Main.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/Main.scala?rev=1029831&r1=1029830&r2=1029831&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/Main.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/Main.scala
Mon Nov  1 20:53:29 2010
@@ -22,6 +22,7 @@ import org.mortbay.jetty.Server
 import org.mortbay.jetty.nio.SelectChannelConnector
 import org.mortbay.jetty.webapp.WebAppContext
 import org.apache.commons.logging.LogFactory
+import java.io.File
 
 /**
  * <p>
@@ -47,7 +48,18 @@ object Main {
 
  def main(args:Array[String]) = run
 
-  def run = {
+  def run:Unit = {
+
+    var dir = new File(webAppDir);
+    if( !dir.exists ) {
+      webAppDir = "apollo-web/"+webAppDir
+      dir = new File(webAppDir);
+      if( !dir.exists ) {
+        println("The directory: "+webAppDir+" does not exist.")
+        return
+      }
+    }
+    
     println("===========================")
     println("Starting up ActiveMQ Apollo");
     println("===========================")
@@ -68,7 +80,6 @@ object Main {
     println("=======================")
     println("Shutdown");
     println("=======================")
-
   }
 
   def start: Unit = {



Mime
View raw message