[jboss-cvs] JBossAS SVN: r74000 - trunk/varia/src/resources/jmx/html.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Jun 3 10:30:32 EDT 2008


Author: jprindiv
Date: 2008-06-03 10:30:32 -0400 (Tue, 03 Jun 2008)
New Revision: 74000

Modified:
   trunk/varia/src/resources/jmx/html/displayMBeans.jsp
Log:
JBAS-4156 Adding display of jboss.bind.address to header of JMX console


Modified: trunk/varia/src/resources/jmx/html/displayMBeans.jsp
===================================================================
--- trunk/varia/src/resources/jmx/html/displayMBeans.jsp	2008-06-03 14:18:05 UTC (rev 73999)
+++ trunk/varia/src/resources/jmx/html/displayMBeans.jsp	2008-06-03 14:30:32 UTC (rev 74000)
@@ -14,14 +14,27 @@
 <body>
    <img src="images/logo.gif" align="right" border="0" alt="logo" />
    <%
+   	String bindAddress = "";
    	String hostname = "";
+   	String hostAddressDisplay = "";
+
    	try {
+   		bindAddress = System.getProperty("jboss.bind.address", "");
+   	} catch (SecurityException se) {
+   	}
+
+   	try {
    		hostname = InetAddress.getLocalHost().getHostName();
    	} catch (IOException e) {
    	}
+
+   	hostAddressDisplay = hostname;
+   	if (!bindAddress.equals("")) {
+   		hostAddressDisplay = hostAddressDisplay + " (" + bindAddress + ")";
+   	}
    %>
    <h1>JMX Agent View</h1>
-   <h3><%=hostname%></h3>
+   <h3><%=hostAddressDisplay%></h3>
 
 <form action="HtmlAdaptor?action=displayMBeans" method="post" name="applyFilter" id="applyFilter">
 ObjectName Filter (e.g. "jboss:*", "*:service=invoker,*"): <br />




More information about the jboss-cvs-commits mailing list