[jboss-cvs] JBossAS SVN: r89306 - projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat May 23 12:40:53 EDT 2009


Author: ALRubinger
Date: 2009-05-23 12:40:53 -0400 (Sat, 23 May 2009)
New Revision: 89306

Modified:
   projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/JBossASServerImpl.java
Log:
[JBBOOT-73] Tests to ensure we do not leak out internal state of start date

Modified: projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/JBossASServerImpl.java
===================================================================
--- projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/JBossASServerImpl.java	2009-05-23 16:23:50 UTC (rev 89305)
+++ projects/bootstrap/trunk/impl-as/src/main/java/org/jboss/bootstrap/impl/as/server/JBossASServerImpl.java	2009-05-23 16:40:53 UTC (rev 89306)
@@ -42,6 +42,7 @@
 import org.jboss.bootstrap.spi.lifecycle.LifecycleEventHandler;
 import org.jboss.bootstrap.spi.lifecycle.LifecycleState;
 import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
+import org.jboss.logging.Logger;
 import org.jboss.managed.api.annotation.ManagementComponent;
 import org.jboss.managed.api.annotation.ManagementObject;
 import org.jboss.managed.api.annotation.ManagementProperties;
@@ -65,6 +66,11 @@
    //-------------------------------------------------------------------------------||
 
    /**
+    * Logger
+    */
+   private static final Logger log = Logger.getLogger(JBossASServerImpl.class);
+
+   /**
     * The validator instance 
     */
    private static final ConfigurationValidator<JBossASServerConfig> VALIDATOR;
@@ -289,8 +295,35 @@
       final LifecycleEventHandler stopHandler = new KernelStopEventLifecycleEventHandler(bootstrap);
       this.registerEventHandler(startHandler, LifecycleState.STARTED);
       this.registerEventHandler(stopHandler, LifecycleState.STOPPED);
+
+      // Log the server info
+      this.logServerInfo();
    }
 
+   /**
+    * Logs out information from the underlying server configuration
+    */
+   protected void logServerInfo()
+   {
+
+      // Get the config
+      final JBossASServerConfig config = this.getConfiguration();
+
+      // Log
+      log.info("Bootstrap URL: " + config.getBootstrapUrl());
+      log.info("JBOSS_HOME URL: " + config.getJBossHome());
+      log.info("Common Base URL: " + config.getCommonBaseLocation());
+      log.info("Common Library URL: " + config.getCommonLibLocation());
+      log.info("Server Name: " + config.getServerName());
+      log.info("Server Base URL: " + config.getServerBaseLocation());
+      log.info("Server Library URL: " + config.getServerLibLocation());
+      log.info("Server Config URL: " + config.getServerConfLocation());
+      log.info("Server Home URL: " + config.getServerHomeLocation());
+      log.info("Server Data URL: " + config.getServerDataLocation());
+      log.info("Server Log URL: " + config.getServerLogLocation());
+      log.info("Server Temp URL: " + config.getServerTempLocation());
+   }
+
    //-------------------------------------------------------------------------------||
    // Overridden Implementations ---------------------------------------------------||
    //-------------------------------------------------------------------------------||




More information about the jboss-cvs-commits mailing list