geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r531312 - /geronimo/server/branches/1.2/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java
Date Mon, 23 Apr 2007 01:38:01 GMT
Author: jdillon
Date: Sun Apr 22 18:38:00 2007
New Revision: 531312

URL: http://svn.apache.org/viewvc?view=rev&rev=531312
Log:
Added more log detail about the verify timeout
Time the startup of the server

Modified:
    geronimo/server/branches/1.2/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java

Modified: geronimo/server/branches/1.2/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.2/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java?view=diff&rev=531312&r1=531311&r2=531312
==============================================================================
--- geronimo/server/branches/1.2/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java
(original)
+++ geronimo/server/branches/1.2/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java
Sun Apr 22 18:38:00 2007
@@ -46,6 +46,8 @@
 import org.codehaus.plexus.util.FileUtils;
 import org.apache.commons.io.IOUtils;
 
+import org.apache.commons.lang.time.StopWatch;
+
 /**
  * Start the Geronimo server.
  *
@@ -238,6 +240,9 @@
         // Holds any exception that was thrown during startup
         final ObjectHolder errorHolder = new ObjectHolder();
 
+        StopWatch watch = new StopWatch();
+        watch.start();
+
         // Start the server int a seperate thread
         Thread t = new Thread("Geronimo Server Runner") {
             public void run() {
@@ -256,7 +261,7 @@
         };
         t.start();
 
-        log.debug("Waiting for Geronimo server...");
+        log.info("Waiting for Geronimo server...");
 
         // Setup a callback to time out verification
         final ObjectHolder verifyTimedOut = new ObjectHolder();
@@ -268,7 +273,7 @@
         };
 
         if (verifyTimeout > 0) {
-            log.debug("Starting verify timeout task; triggers in: " + verifyTimeout + "s");
+            log.debug("Starting verify timeout task; triggers in: " + verifyTimeout + " seconds");
             timer.schedule(timeoutTask, verifyTimeout * 1000);
         }
 
@@ -277,7 +282,7 @@
         boolean started = false;
         while (!started) {
             if (verifyTimedOut.isSet()) {
-                String msg = "Unable to verify if the server was started in the given time";
+                String msg = "Unable to verify if the server was started in the given time
(" + verifyTimeout + " seconds)";
                 log.error(msg);
                 dumpServerLog();
                 throw new MojoExecutionException(msg);
@@ -305,7 +310,7 @@
         // Stop the timer, server should be up now
         timeoutTask.cancel();
         
-        log.info("Geronimo server started");
+        log.info("Geronimo server started in " + watch);
 
         if (!background) {
             log.info("Waiting for Geronimo server to shutdown...");



Mime
View raw message