geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject cvs commit: incubator-geronimo/modules/core/src/java/org/apache/geronimo Main.java
Date Fri, 29 Aug 2003 17:56:39 GMT
jdillon     2003/08/29 10:56:39

  Modified:    modules/core/src/java/org/apache/geronimo Main.java
  Log:
   o Readded preatty printing of start time duration
  
  Revision  Changes    Path
  1.14      +11 -7     incubator-geronimo/modules/core/src/java/org/apache/geronimo/Main.java
  
  Index: Main.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/Main.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Main.java	27 Aug 2003 20:38:49 -0000	1.13
  +++ Main.java	29 Aug 2003 17:56:39 -0000	1.14
  @@ -66,6 +66,10 @@
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   import org.apache.commons.logging.impl.LogFactoryImpl;
  +
  +import org.apache.geronimo.common.Duration;
  +import org.apache.geronimo.common.StopWatch; 
  +
   import org.apache.geronimo.deployment.DeploymentException;
   import org.apache.geronimo.jmx.JMXKernel;
   
  @@ -101,15 +105,16 @@
       /**
        * Main entry point
        */
  -    public void run() {
  +    public void run() 
  +    {
  +        StopWatch watch = new StopWatch(true);
  +        
           Object[] deployArgs = {bootURL};
           JMXKernel kernel = null;
           ShutdownThread hook = new ShutdownThread("Shutdown-Thread", Thread.currentThread());
           try {
               Runtime.getRuntime().addShutdownHook(hook);
               try {
  -                long start = System.currentTimeMillis();
  -
                   log.info("Starting JMXKernel");
                   kernel = new JMXKernel(domainName);
   
  @@ -145,9 +150,8 @@
                   log.info("Deploying Bootstrap Services from " + bootURL);
                   MBeanServer mbServer = kernel.getMBeanServer();
                   mbServer.invoke(controllerName, "deploy", deployArgs, DEPLOY_ARG_TYPES);
  -
  -                long end = System.currentTimeMillis();
  -                log.info("Started Server in " + (end - start) + "ms.");
  +                
  +                log.info("Started Server in " + new Duration(watch.getTime())); 
               } catch (Throwable e) {
                   log.error("Error starting Server", e);
                   return;
  
  
  

Mime
View raw message