geronimo-scm mailing list archives

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

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

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

Modified: geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java?view=diff&rev=531310&r1=531309&r2=531310
==============================================================================
--- geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java
(original)
+++ geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java
Sun Apr 22 18:27:21 2007
@@ -41,6 +41,8 @@
 
 import org.codehaus.plexus.util.FileUtils;
 
+import org.apache.commons.lang.time.StopWatch;
+
 /**
  * Start the Geronimo server.
  *
@@ -281,7 +283,10 @@
 
         // 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() {
@@ -300,7 +305,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();
@@ -312,7 +317,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);
         }
 
@@ -321,7 +326,7 @@
         boolean started = false;
         while (!started) {
             if (verifyTimedOut.isSet()) {
-                throw new MojoExecutionException("Unable to verify if the server was started
in the given time");
+                throw new MojoExecutionException("Unable to verify if the server was started
in the given time (" + verifyTimeout + " seconds)");
             }
 
             if (errorHolder.isSet()) {
@@ -343,7 +348,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