[jboss-cvs] JBossAS SVN: r85931 - branches/JBPAPP_4_2_0_GA_CP/system/src/main/org/jboss/system/server.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Mar 16 10:56:10 EDT 2009


Author: galder.zamarreno at jboss.com
Date: 2009-03-16 10:56:10 -0400 (Mon, 16 Mar 2009)
New Revision: 85931

Modified:
   branches/JBPAPP_4_2_0_GA_CP/system/src/main/org/jboss/system/server/ServerInfo.java
Log:
[JBPAPP-1718] Log VM arguments in boot.log/server.log startup.

Modified: branches/JBPAPP_4_2_0_GA_CP/system/src/main/org/jboss/system/server/ServerInfo.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/system/src/main/org/jboss/system/server/ServerInfo.java	2009-03-16 14:47:47 UTC (rev 85930)
+++ branches/JBPAPP_4_2_0_GA_CP/system/src/main/org/jboss/system/server/ServerInfo.java	2009-03-16 14:56:10 UTC (rev 85931)
@@ -21,6 +21,8 @@
  */
 package org.jboss.system.server;
 
+import java.lang.management.ManagementFactory;
+import java.lang.management.RuntimeMXBean;
 import java.lang.reflect.Method;
 import java.text.DecimalFormat;
 import java.util.Enumeration;
@@ -46,6 +48,7 @@
  * @author <a href="mailto:jason at planet57.com">Jason Dillon</a>
  * @author <a href="mailto:marc.fleury at jboss.org">Marc Fleury</a>
  * @author <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
+ * @author <a href="mailto:galder.zamarreno at jboss.com">Galder Zamarreno</a>
  * @version $Revision$
  */
 public class ServerInfo
@@ -125,6 +128,8 @@
       System.getProperty("os.version") + "," +
       System.getProperty("os.arch"));
       
+      log.info("VM arguments: " + getVMArguments());
+      
       // Dump out the entire system properties
       log.debug("Full System Properties Dump");
       Enumeration names = System.getProperties().propertyNames();
@@ -703,6 +708,18 @@
       }
    }
    
+   private String getVMArguments()
+   {
+      String args = "";
+      RuntimeMXBean rmBean = ManagementFactory.getRuntimeMXBean();
+      List inputArguments = rmBean.getInputArguments();
+      for (Iterator i = inputArguments.iterator(); i.hasNext();) 
+      {
+          args += i.next() + " ";
+      }
+      return args;
+   }
+   
    /**
     * Display the java.lang.Package info for the pkgName
     *




More information about the jboss-cvs-commits mailing list