init
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
Manifest-Version: 1.0
|
||||
Ant-Version: Apache Ant 1.6.2
|
||||
Created-By: 1.5.0_15-b04 (Sun Microsystems Inc.)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
<jboss-web>
|
||||
<!-- Uncomment the security-domain to enable security. You will
|
||||
need to edit the htmladaptor login configuration to setup the
|
||||
login modules used to authentication users. -->
|
||||
<security-domain>java:/jaas/jmx-console</security-domain>
|
||||
</jboss-web>
|
||||
106
dcm4chee/default/deploy/jmx-console.war/WEB-INF/web.xml
Normal file
106
dcm4chee/default/deploy/jmx-console.war/WEB-INF/web.xml
Normal file
@@ -0,0 +1,106 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE web-app PUBLIC
|
||||
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
|
||||
"http://java.sun.com/dtd/web-app_2_3.dtd">
|
||||
|
||||
<web-app>
|
||||
<description>The standard web descriptor for the html adaptor</description>
|
||||
<!--
|
||||
<filter>
|
||||
<filter-name>JmxOpsAccessControlFilter</filter-name>
|
||||
<filter-class>org.jboss.jmx.adaptor.html.JMXOpsAccessControlFilter</filter-class>
|
||||
<init-param>
|
||||
<param-name>updateAttributes</param-name>
|
||||
<param-value>UpdateAttributeRole</param-value>
|
||||
<description>Comma-delimited Roles that define the JMX Operation denoting updation of Attributes</description>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>invokeOp</param-name>
|
||||
<param-value>InvokeOpRole</param-value>
|
||||
<description>Comma-delimited Roles that define the JMX Operation denoting Invocation of Operations</description>
|
||||
</init-param>
|
||||
</filter>
|
||||
<filter-mapping>
|
||||
<filter-name>JmxOpsAccessControlFilter</filter-name>
|
||||
<servlet-name>HtmlAdaptor</servlet-name>
|
||||
</filter-mapping>
|
||||
-->
|
||||
<servlet>
|
||||
<servlet-name>HtmlAdaptor</servlet-name>
|
||||
<servlet-class>org.jboss.jmx.adaptor.html.HtmlAdaptorServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>ClusteredConsoleServlet</servlet-name>
|
||||
<servlet-class>org.jboss.jmx.adaptor.html.ClusteredConsoleServlet</servlet-class>
|
||||
<init-param>
|
||||
<param-name>jgProps</param-name>
|
||||
<param-value>UDP(ip_mcast=true;ip_ttl=16;loopback=false;mcast_addr=${jboss.partition.udpGroup:228.1.2.3};mcast_port=${jboss.partition.udpPort:45566}):
|
||||
org.jboss.jmx.adaptor.control.FindView
|
||||
</param-value>
|
||||
<description>The JGroups protocol stack config</description>
|
||||
</init-param>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>DisplayMBeans</servlet-name>
|
||||
<jsp-file>/displayMBeans.jsp</jsp-file>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>InspectMBean</servlet-name>
|
||||
<jsp-file>/inspectMBean.jsp</jsp-file>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>DisplayOpResult</servlet-name>
|
||||
<jsp-file>/displayOpResult.jsp</jsp-file>
|
||||
</servlet>
|
||||
<servlet>
|
||||
<servlet-name>ClusterView</servlet-name>
|
||||
<jsp-file>/cluster/clusterView.jsp</jsp-file>
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>HtmlAdaptor</servlet-name>
|
||||
<url-pattern>/HtmlAdaptor</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>ClusteredConsoleServlet</servlet-name>
|
||||
<url-pattern>/cluster/ClusteredConsole</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>DisplayMBeans</servlet-name>
|
||||
<url-pattern>/DisplayMBeans</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>InspectMBean</servlet-name>
|
||||
<url-pattern>/InspectMBean</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>DisplayOpResult</servlet-name>
|
||||
<url-pattern>/DisplayOpResult</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<!-- A security constraint that restricts access to the HTML JMX console
|
||||
to users with the role JBossAdmin. Edit the roles to what you want and
|
||||
uncomment the WEB-INF/jboss-web.xml/security-domain element to enable
|
||||
secured access to the HTML JMX console. -->
|
||||
<security-constraint>
|
||||
<web-resource-collection>
|
||||
<web-resource-name>HtmlAdaptor</web-resource-name>
|
||||
<description>An example security config that only allows users with the
|
||||
role JBossAdmin to access the HTML JMX console web application
|
||||
</description>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</web-resource-collection>
|
||||
<auth-constraint>
|
||||
<role-name>JBossAdmin</role-name>
|
||||
</auth-constraint>
|
||||
</security-constraint>
|
||||
|
||||
<login-config>
|
||||
<auth-method>BASIC</auth-method>
|
||||
<realm-name>JBoss JMX Console</realm-name>
|
||||
</login-config>
|
||||
|
||||
<security-role>
|
||||
<role-name>JBossAdmin</role-name>
|
||||
</security-role>
|
||||
</web-app>
|
||||
112
dcm4chee/default/deploy/jmx-console.war/checkJNDI.jsp
Normal file
112
dcm4chee/default/deploy/jmx-console.war/checkJNDI.jsp
Normal file
@@ -0,0 +1,112 @@
|
||||
<%@page contentType="text/html"
|
||||
import="java.net.*,java.util.*,javax.naming.*,java.io.*"
|
||||
%>
|
||||
<html>
|
||||
<head>
|
||||
<title>JBoss JNDI Check</title>
|
||||
<link rel="stylesheet" href="style_master.css" type="text/css">
|
||||
<meta http-equiv="cache-control" content="no-cache">
|
||||
</head>
|
||||
<body>
|
||||
<table width="100%">
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src="images/logo.gif" align="left" border="0" alt="JBoss"></td>
|
||||
<td valign="middle">
|
||||
<%
|
||||
String hostname = "<<Unknown - see log/server.log>>";
|
||||
try
|
||||
{
|
||||
hostname = InetAddress.getLocalHost().getHostName();
|
||||
}
|
||||
catch(IOException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
%>
|
||||
<h1>JNDI Checking for host <code><%= hostname %></code></h1>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<table border='1'>
|
||||
<tr>
|
||||
<td><h2>Test</h2></td>
|
||||
<td><h2>Result</h2></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>InitialContext properites</td>
|
||||
<td><table border='1'>
|
||||
<%
|
||||
try
|
||||
{
|
||||
InitialContext ctx = new InitialContext();
|
||||
Hashtable props = ctx.getEnvironment();
|
||||
for (Iterator i = props.keySet().iterator(); i.hasNext();)
|
||||
{
|
||||
Object key = i.next();
|
||||
out.print("<tr><td>");
|
||||
out.print(key);
|
||||
out.print('=');
|
||||
out.print(props.get(key));
|
||||
out.print("</td></tr>");
|
||||
}
|
||||
}
|
||||
catch (NamingException e)
|
||||
{
|
||||
out.print(e.toString());
|
||||
}
|
||||
%>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>jndi.properties locations</td>
|
||||
<td><table border='1'>
|
||||
<%
|
||||
ClassLoader loader = Thread.currentThread().getContextClassLoader();
|
||||
for (Enumeration e = loader.getResources("jndi.properties"); e.hasMoreElements();)
|
||||
{
|
||||
out.print("<tr><td>");
|
||||
out.print(e.nextElement());
|
||||
out.print("</td></tr>");
|
||||
}
|
||||
%>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Global bindings</td>
|
||||
<td><table border='1'>
|
||||
<%
|
||||
try
|
||||
{
|
||||
for (Enumeration e = new InitialContext().listBindings(""); e.hasMoreElements();)
|
||||
{
|
||||
out.print("<tr><td>");
|
||||
out.print(e.nextElement());
|
||||
out.print("</td></tr>");
|
||||
}
|
||||
}
|
||||
catch (NamingException ignored) {}
|
||||
%>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>JVM local bindings</td>
|
||||
<td><table border='1'>
|
||||
<%
|
||||
try
|
||||
{
|
||||
for (Enumeration e = new InitialContext().listBindings("java:"); e.hasMoreElements();)
|
||||
{
|
||||
out.print("<tr><td>");
|
||||
out.print(e.nextElement());
|
||||
out.print("</td></tr>");
|
||||
}
|
||||
}
|
||||
catch (NamingException ignored) {}
|
||||
%>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,69 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Cluster View Bootstrap</title>
|
||||
<link rel="stylesheet" href="../style_master.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td width="250" ><img src="../images/logo.gif" align="left" border="0" alt=""></td>
|
||||
<td><h1>JBoss Cluster Bootstrap</h1></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<body>
|
||||
The cluster nodes to view need to be specified via some bootstrap mechanism.
|
||||
This can be done using any of the following methods.
|
||||
|
||||
<h1>Bootstrap Using Naming Discovery</h1>
|
||||
This determines the cluster entry point by doing an HAJNDI naming service
|
||||
discovery query. The query may be restricted to a given partition name by
|
||||
specifying the name in the PartitionName field.
|
||||
If not specified than the first partition to respond will be choosen.
|
||||
<form action="ClusteredConsole?action=bootstrap" method="post" target="ClusterIndex">
|
||||
<input type="hidden" name="bootstrap" value="discovery">
|
||||
<table cellspacing="2" cellpadding="2" border="0">
|
||||
<tr>
|
||||
<td>PartitionName:</td><td><input type="text" name="partition" size="40"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DiscoveryName:</td><td><input type="text" name="discoveryGroup" size="40" value="230.0.0.4"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DiscoveryPort:</td><td><input type="text" name="discoveryPort" size="40" value="1102"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DiscoveryTimeout:</td><td><input type="text" name="discoveryTimeout" size="40" value="5000"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="reset" name="reset" value="Clear"></td>
|
||||
<td><input type="submit" name="submit" value="Bootstrap"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<h1>Bootstrap Using a Hostname</h1>
|
||||
This determines the cluster entry point(s) by querying the JNDI service
|
||||
on the indicated server for the available cluster paritition services.
|
||||
Any cluster to which the server belongs will serve as an entry point for
|
||||
determining the members of the cluster. To query the server hosting the
|
||||
jmx-console application use "locahost" for the hostname.
|
||||
<form action="ClusteredConsole" method="post" target="ClusterIndex">
|
||||
<input type="hidden" name="bootstrap" value="byhost">
|
||||
<table cellspacing="2" cellpadding="2" border="0">
|
||||
<tr>
|
||||
<td>Hostname:</td><td><input type="text" name="hostname" value="localhost" size="40"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Port:</td><td><input type="text" name="port" value="1099" size="40"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="reset" name="reset" value="Clear"></td>
|
||||
<td><input type="submit" name="submit" value="Bootstrap"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
<%@page contentType="text/html"
|
||||
import="java.net.*,java.io.*"
|
||||
%>
|
||||
<html>
|
||||
<head><title>Clustered JBoss Management Console</title>
|
||||
<link rel="stylesheet" href="../style_master.css" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
<table>
|
||||
<tr><td>
|
||||
<h2>Cluster View Bootstrap</h2>
|
||||
<a href="bootstrap.html" target="ClusterNodeView">Reinvoke Bootstrap</a>
|
||||
|
||||
<h2>Loaded Clusters</h2>
|
||||
<%
|
||||
String partition = (String) request.getAttribute("partition");
|
||||
%>
|
||||
<h3 class='DomainName'><%= partition %></h2>
|
||||
<ul class='MBeanList'>
|
||||
<%
|
||||
String[] partitionHosts = (String[]) request.getAttribute("partitionHosts");
|
||||
for(int h = 0; h < partitionHosts.length; h ++)
|
||||
{
|
||||
String host = partitionHosts[h];
|
||||
String hostname = "";
|
||||
|
||||
try
|
||||
{
|
||||
hostname = InetAddress.getByName(host).getHostName();
|
||||
}
|
||||
catch(IOException e) {}
|
||||
|
||||
String hostURL = "http://"+host+":8080/jmx-console//HtmlAdaptor?action=displayMBeans";
|
||||
%>
|
||||
<li><a href="<%= hostURL%>" target="ClusterNodeView"><%= hostname %></a></li>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</ul>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,6 @@
|
||||
<!-- frames -->
|
||||
<frameset cols="20%, *">
|
||||
<frame name="ClusterIndex" src="ClusteredConsole?action=index" marginwidth="10" marginheight="10" scrolling="auto" frameborder="0">
|
||||
<frame name="ClusterNodeView" src="bootstrap.html" marginwidth="10" marginheight="10" scrolling="auto" frameborder="0">
|
||||
<noframes>A frames enabled browser is required for the cluster view</noframes>
|
||||
</frameset>
|
||||
80
dcm4chee/default/deploy/jmx-console.war/displayMBeans.jsp
Normal file
80
dcm4chee/default/deploy/jmx-console.war/displayMBeans.jsp
Normal file
@@ -0,0 +1,80 @@
|
||||
<%@page contentType="text/html"
|
||||
import="java.net.*,java.util.*,org.jboss.jmx.adaptor.model.*,java.io.*"
|
||||
%>
|
||||
<html>
|
||||
<head>
|
||||
<%
|
||||
String bindAddress = "";
|
||||
String serverName = "";
|
||||
try
|
||||
{
|
||||
bindAddress = System.getProperty("jboss.bind.address", "");
|
||||
serverName = System.getProperty("jboss.server.name", "");
|
||||
}
|
||||
catch (SecurityException se) {}
|
||||
|
||||
String hostname = "";
|
||||
try
|
||||
{
|
||||
hostname = InetAddress.getLocalHost().getHostName();
|
||||
}
|
||||
catch(IOException e) {}
|
||||
|
||||
String hostInfo = hostname;
|
||||
if (!bindAddress.equals(""))
|
||||
{
|
||||
hostInfo = hostInfo + " (" + bindAddress + ")";
|
||||
}
|
||||
%>
|
||||
<title>JBoss JMX Management Console - <%= hostInfo %></title>
|
||||
<link rel="stylesheet" href="style_master.css" type="text/css">
|
||||
<meta http-equiv="cache-control" content="no-cache">
|
||||
</head>
|
||||
<body>
|
||||
<table width="100%">
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src="images/logo.gif" align="left" border="0" alt="JBoss"></td>
|
||||
<td valign="middle">
|
||||
<h1>JMX Agent View</h1>
|
||||
<h3><%= hostInfo %> - <%= serverName %></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<form action="HtmlAdaptor?action=displayMBeans" method="post" name="applyFilter" id="applyFilter">
|
||||
ObjectName Filter (e.g. "jboss:*", "*:service=invoker,*") :<input type="text" name="filter" size="40" value="<%= request.getAttribute("filter")%>" /><input type="submit" name="apply" value="ApplyFilter">
|
||||
<%
|
||||
if (request.getAttribute("filterError") != null) {
|
||||
out.println("<br/><span class='error'>"+request.getAttribute("filterError")+"</span>");
|
||||
}
|
||||
%>
|
||||
</form>
|
||||
<hr>
|
||||
<%
|
||||
Iterator mbeans = (Iterator) request.getAttribute("mbeans");
|
||||
while( mbeans.hasNext() )
|
||||
{
|
||||
DomainData domainData = (DomainData) mbeans.next();
|
||||
%>
|
||||
<h2 class='DomainName'><%= domainData.getDomainName() %></h2>
|
||||
<ul class='MBeanList'>
|
||||
<%
|
||||
MBeanData[] data = domainData.getData();
|
||||
for(int d = 0; d < data.length; d ++)
|
||||
{
|
||||
String name = data[d].getObjectName().toString();
|
||||
String properties = data[d].getNameProperties();
|
||||
%>
|
||||
<li><a href="HtmlAdaptor?action=inspectMBean&name=<%= URLEncoder.encode(name) %>"><%= URLDecoder.decode(properties) %></a></li>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</ul>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
82
dcm4chee/default/deploy/jmx-console.war/displayOpResult.jsp
Normal file
82
dcm4chee/default/deploy/jmx-console.war/displayOpResult.jsp
Normal file
@@ -0,0 +1,82 @@
|
||||
<%@page contentType="text/html"
|
||||
import="java.net.*"
|
||||
%>
|
||||
<html>
|
||||
<head>
|
||||
<title>Operation Results</title>
|
||||
<link rel="stylesheet" href="style_master.css" type="text/css">
|
||||
<meta http-equiv="cache-control" content="no-cache">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<jsp:useBean id='opResultInfo' class='org.jboss.jmx.adaptor.control.OpResultInfo' type='org.jboss.jmx.adaptor.control.OpResultInfo' scope='request'/>
|
||||
<%
|
||||
if(opResultInfo.name == null)
|
||||
{
|
||||
%>
|
||||
<jsp:forward page="/HtmlAdaptor?action=displayMBeans" />
|
||||
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<table width="100%">
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src="images/logo.gif" align="left" border="0" alt="JBoss"></td>
|
||||
<td valign="middle"><h1>JMX MBean Operation Result <code><%= opResultInfo.name%>()</code></h1></td>
|
||||
<tr/>
|
||||
</table>
|
||||
|
||||
<tr><td>
|
||||
|
||||
|
||||
<table cellpadding="5">
|
||||
<tr>
|
||||
<td><a href='HtmlAdaptor?action=displayMBeans'>Back to Agent View</a></td>
|
||||
<td>
|
||||
<td><a href='HtmlAdaptor?action=inspectMBean&name=<%= URLEncoder.encode(request.getParameter("name")) %>'>Back to MBean View</a></td>
|
||||
<td>
|
||||
<td><a href=
|
||||
<%
|
||||
out.print("'HtmlAdaptor?action=invokeOpByName");
|
||||
out.print("&name=" + URLEncoder.encode(request.getParameter("name")));
|
||||
out.print("&methodName=" + opResultInfo.name );
|
||||
|
||||
for (int i=0; i<opResultInfo.args.length; i++)
|
||||
{
|
||||
out.print("&argType=" + opResultInfo.signature[i]);
|
||||
out.print("&arg" + i + "=" + opResultInfo.args[i]);
|
||||
}
|
||||
|
||||
out.println("'>Reinvoke MBean Operation");
|
||||
%>
|
||||
</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<hr>
|
||||
<span class='OpResult'>
|
||||
<%
|
||||
if( opResultInfo.result == null )
|
||||
{
|
||||
%>
|
||||
Operation completed successfully without a return value.
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
String opResultString = opResultInfo.result.toString();
|
||||
boolean hasPreTag = opResultString.startsWith("<pre>");
|
||||
if( hasPreTag == false )
|
||||
out.println("<pre>");
|
||||
out.println(opResultString);
|
||||
if( hasPreTag == false )
|
||||
out.println("</pre>");
|
||||
}
|
||||
%>
|
||||
</span>
|
||||
</td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
BIN
dcm4chee/default/deploy/jmx-console.war/images/logo.gif
Normal file
BIN
dcm4chee/default/deploy/jmx-console.war/images/logo.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
2
dcm4chee/default/deploy/jmx-console.war/index.jsp
Normal file
2
dcm4chee/default/deploy/jmx-console.war/index.jsp
Normal file
@@ -0,0 +1,2 @@
|
||||
<%@page contentType="text/html"%>
|
||||
<jsp:forward page="/HtmlAdaptor?action=displayMBeans" />
|
||||
334
dcm4chee/default/deploy/jmx-console.war/inspectMBean.jsp
Normal file
334
dcm4chee/default/deploy/jmx-console.war/inspectMBean.jsp
Normal file
@@ -0,0 +1,334 @@
|
||||
<%@page contentType="text/html"
|
||||
import="java.net.*,java.util.*,javax.management.*,javax.management.modelmbean.*,
|
||||
org.jboss.jmx.adaptor.control.Server,
|
||||
org.jboss.jmx.adaptor.control.AttrResultInfo,
|
||||
org.jboss.jmx.adaptor.model.*,
|
||||
java.lang.reflect.Array,
|
||||
org.jboss.util.propertyeditor.PropertyEditors"
|
||||
%>
|
||||
<%!
|
||||
public String fixDescription(String desc)
|
||||
{
|
||||
if (desc == null || desc.equals(""))
|
||||
{
|
||||
return "(no description)";
|
||||
}
|
||||
return desc;
|
||||
}
|
||||
%>
|
||||
<html>
|
||||
<head>
|
||||
<title>MBean Inspector</title>
|
||||
<link rel="stylesheet" href="style_master.css" type="text/css">
|
||||
<meta http-equiv="cache-control" content="no-cache">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<jsp:useBean id='mbeanData' class='org.jboss.jmx.adaptor.model.MBeanData' scope='request'/>
|
||||
|
||||
<%
|
||||
ObjectName objectName = mbeanData.getObjectName();
|
||||
String objectNameString = mbeanData.getName();
|
||||
MBeanInfo mbeanInfo = mbeanData.getMetaData();
|
||||
MBeanAttributeInfo[] attributeInfo = mbeanInfo.getAttributes();
|
||||
MBeanOperationInfo[] operationInfo = mbeanInfo.getOperations();
|
||||
%>
|
||||
|
||||
<table width="100%">
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src="images/logo.gif" align="left" border="0" alt="JBoss"></td>
|
||||
<td valign="middle"><h1>JMX MBean View</h1></td>
|
||||
<tr/>
|
||||
</table>
|
||||
<ul>
|
||||
<table>
|
||||
<tr>
|
||||
<td>MBean Name:</td>
|
||||
<td><b>Domain Name:</b></td>
|
||||
<td><%= objectName.getDomain() %></td>
|
||||
</tr>
|
||||
<%
|
||||
Hashtable properties = objectName.getKeyPropertyList();
|
||||
Iterator it = properties.keySet().iterator();
|
||||
while( it.hasNext() )
|
||||
{
|
||||
String key = (String) it.next();
|
||||
String value = (String) properties.get( key );
|
||||
%>
|
||||
<tr><td></td><td><b><%= key %>: </b></td><td><%= value %></td></tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<tr><td>MBean Java Class:</td><td colspan="3"><jsp:getProperty name='mbeanData' property='className'/></td></tr>
|
||||
</table>
|
||||
</ul>
|
||||
<table cellpadding="5">
|
||||
<tr>
|
||||
<td><a href='HtmlAdaptor?action=displayMBeans'>Back to Agent View</a></td>
|
||||
<td>
|
||||
<td><a href='HtmlAdaptor?action=inspectMBean&name=<%= URLEncoder.encode(request.getParameter("name")) %>'>Refresh MBean View</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<hr>
|
||||
<h3>MBean description:</h3>
|
||||
<%= fixDescription(mbeanInfo.getDescription())%>
|
||||
|
||||
<hr>
|
||||
<h3>List of MBean attributes:</h3>
|
||||
|
||||
<form method="post" action="HtmlAdaptor">
|
||||
<input type="hidden" name="action" value="updateAttributes">
|
||||
<input type="hidden" name="name" value="<%= objectNameString %>">
|
||||
<table cellspacing="1" cellpadding="1" border="1">
|
||||
<tr class="AttributesHeader">
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Access</th>
|
||||
<th>Value</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
<%
|
||||
boolean hasWriteable = false;
|
||||
String sep = System.getProperty("line.separator", "\n");
|
||||
for(int a = 0; a < attributeInfo.length; a ++)
|
||||
{
|
||||
MBeanAttributeInfo attrInfo = attributeInfo[a];
|
||||
String attrName = attrInfo.getName();
|
||||
String attrType = attrInfo.getType();
|
||||
AttrResultInfo attrResult = Server.getMBeanAttributeResultInfo(objectNameString, attrInfo);
|
||||
String attrValue = attrResult.getAsText();
|
||||
String access = "";
|
||||
if( attrInfo.isReadable() )
|
||||
access += "R";
|
||||
if( attrInfo.isWritable() )
|
||||
{
|
||||
access += "W";
|
||||
hasWriteable = true;
|
||||
}
|
||||
String attrDescription = fixDescription(attrInfo.getDescription());
|
||||
%>
|
||||
<tr>
|
||||
<td><%= attrName %></td>
|
||||
<td><%= attrType %></td>
|
||||
<td><%= access %></td>
|
||||
<td>
|
||||
<%
|
||||
if( attrInfo.isWritable() )
|
||||
{
|
||||
String readonly = attrResult.editor == null ? "readonly" : "";
|
||||
if( attrType.equals("boolean") || attrType.equals("java.lang.Boolean") )
|
||||
{
|
||||
// Boolean true/false radio boxes
|
||||
Boolean value = attrValue == null || "".equals( attrValue ) ? null : Boolean.valueOf(attrValue);
|
||||
String trueChecked = (value == Boolean.TRUE ? "checked" : "");
|
||||
String falseChecked = (value == Boolean.FALSE ? "checked" : "");
|
||||
String naChecked = value == null ? "checked" : "";
|
||||
%>
|
||||
<input type="radio" name="<%= attrName %>" value="True" <%=trueChecked%>>True
|
||||
<input type="radio" name="<%= attrName %>" value="False" <%=falseChecked%>>False
|
||||
<%
|
||||
// For wrappers, enable a 'null' selection
|
||||
if ( attrType.equals( "java.lang.Boolean" ) && PropertyEditors.isNullHandlingEnabled() )
|
||||
{
|
||||
%>
|
||||
<input type="radio" name="<%= attrName %>" value="" <%=naChecked%>>Null
|
||||
<%
|
||||
}
|
||||
}
|
||||
else if( attrInfo.isReadable() )
|
||||
{ // Text fields for read-write string values
|
||||
if (attrValue == null)
|
||||
{
|
||||
%>
|
||||
<input type="text" name="<%= attrName %>" value="" <%= readonly %>>
|
||||
<%
|
||||
}
|
||||
else if (String.valueOf(attrValue).indexOf(sep) == -1)
|
||||
{
|
||||
%>
|
||||
<input type="text" name="<%= attrName %>" value="<%= attrValue.replace("\"",""") %>" <%= readonly %>>
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<textarea cols="40" rows="5" nowrap='nowrap' type="text" name="<%= attrName %>" <%= readonly %>><%= attrValue %></textarea>
|
||||
<%
|
||||
}
|
||||
}
|
||||
else
|
||||
{ // Empty text fields for write-only
|
||||
%>
|
||||
<input type="text" name="<%= attrName %>" <%= readonly %>>
|
||||
<%
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( attrType.equals("[Ljavax.management.ObjectName;") )
|
||||
{
|
||||
// Array of Object Names
|
||||
ObjectName[] names = (ObjectName[]) Server.getMBeanAttributeObject(objectNameString, attrName);
|
||||
if( names != null )
|
||||
{
|
||||
%>
|
||||
<table>
|
||||
<%
|
||||
for( int i = 0; i < names.length; i++ )
|
||||
{
|
||||
%>
|
||||
<tr><td>
|
||||
<a href="HtmlAdaptor?action=inspectMBean&name=<%= URLEncoder.encode(( names[ i ] + "" )) %>"><%= ( names[ i ] + "" ) %></a>
|
||||
</td></tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
<%
|
||||
}
|
||||
}
|
||||
// Array of some objects
|
||||
else if( attrType.endsWith("[]"))
|
||||
{
|
||||
Object arrayObject = Server.getMBeanAttributeObject(objectNameString, attrName);
|
||||
if (arrayObject != null) {
|
||||
%>
|
||||
<table>
|
||||
<%
|
||||
for (int i = 0; i < Array.getLength(arrayObject); ++i) {
|
||||
%>
|
||||
<tr><td><%=Array.get(arrayObject,i)%></td></tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
<%
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// Just the value string
|
||||
%>
|
||||
<%= attrValue %>
|
||||
<%
|
||||
}
|
||||
}
|
||||
if( attrType.equals("javax.management.ObjectName") )
|
||||
{
|
||||
// Add a link to the mbean
|
||||
if( attrValue != null )
|
||||
{
|
||||
%>
|
||||
<a href="HtmlAdaptor?action=inspectMBean&name=<%= URLEncoder.encode(attrValue) %>">View MBean</a>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
</td>
|
||||
<td><%= attrDescription%></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
<% if( hasWriteable )
|
||||
{
|
||||
%>
|
||||
<input type="submit" value="Apply Changes">
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</form>
|
||||
|
||||
<hr>
|
||||
<h3>List of MBean operations:</h3>
|
||||
<%
|
||||
for(int a = 0; a < operationInfo.length; a ++)
|
||||
{
|
||||
MBeanOperationInfo opInfo = operationInfo[a];
|
||||
boolean accept = true;
|
||||
if (opInfo instanceof ModelMBeanOperationInfo)
|
||||
{
|
||||
Descriptor desc = ((ModelMBeanOperationInfo)opInfo).getDescriptor();
|
||||
String role = (String)desc.getFieldValue("role");
|
||||
if ("getter".equals(role) || "setter".equals(role))
|
||||
{
|
||||
accept = false;
|
||||
}
|
||||
}
|
||||
if (accept)
|
||||
{
|
||||
MBeanParameterInfo[] sig = opInfo.getSignature();
|
||||
%>
|
||||
<form method="post" action="HtmlAdaptor">
|
||||
<input type="hidden" name="action" value="invokeOp">
|
||||
<input type="hidden" name="name" value="<%= objectNameString %>">
|
||||
<input type="hidden" name="methodIndex" value="<%= a %>">
|
||||
<hr align='left' width='80'>
|
||||
<h4><%= opInfo.getReturnType() + " " + opInfo.getName() + "()" %></h4>
|
||||
<p><%= fixDescription(opInfo.getDescription())%></p>
|
||||
<%
|
||||
if( sig.length > 0 )
|
||||
{
|
||||
%>
|
||||
<table cellspacing="2" cellpadding="2" border="1">
|
||||
<tr class="OperationHeader">
|
||||
<th>Param</th>
|
||||
<th>ParamType</th>
|
||||
<th>ParamValue</th>
|
||||
<th>ParamDescription</th>
|
||||
</tr>
|
||||
<%
|
||||
for(int p = 0; p < sig.length; p ++)
|
||||
{
|
||||
MBeanParameterInfo paramInfo = sig[p];
|
||||
String pname = paramInfo.getName();
|
||||
String ptype = paramInfo.getType();
|
||||
if( pname == null || pname.length() == 0 || pname.equals(ptype) )
|
||||
{
|
||||
pname = "arg"+p;
|
||||
}
|
||||
%>
|
||||
<tr>
|
||||
<td><%= pname %></td>
|
||||
<td><%= ptype %></td>
|
||||
<td>
|
||||
<%
|
||||
if( ptype.equals("boolean") || ptype.equals("java.lang.Boolean") )
|
||||
{
|
||||
// Boolean true/false radio boxes
|
||||
%>
|
||||
<input type="radio" name="arg<%= p%>" value="True"checked>True
|
||||
<input type="radio" name="arg<%= p%>" value="False">False
|
||||
<%
|
||||
}
|
||||
else
|
||||
{
|
||||
%>
|
||||
<input type="text" name="arg<%= p%>">
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</td>
|
||||
<td><%= fixDescription(paramInfo.getDescription())%></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<input type="submit" value="Invoke">
|
||||
</form>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
</td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
146
dcm4chee/default/deploy/jmx-console.war/jboss.css
Normal file
146
dcm4chee/default/deploy/jmx-console.war/jboss.css
Normal file
@@ -0,0 +1,146 @@
|
||||
body {
|
||||
margin: 13px 0px 10px 0px;
|
||||
background-color: #ffffff;
|
||||
font-size: 12px;
|
||||
font-family: verdana, arial, "sans-serif";
|
||||
color: #606060;
|
||||
}
|
||||
td {
|
||||
font-size: 12px;
|
||||
font-family: verdana, arial, "sans-serif";
|
||||
color: #606060;
|
||||
}
|
||||
input {
|
||||
font-size: 13px;
|
||||
font-family: verdana, arial, "sans-serif";
|
||||
color: #FF5906;
|
||||
background-color: #f0f0f0;
|
||||
border: 1px solid #cccccc;
|
||||
}
|
||||
img {
|
||||
border: 0px;
|
||||
}
|
||||
p {
|
||||
margin: 10px 30px 10px 20px
|
||||
}
|
||||
h3 {
|
||||
color: #FF5906;
|
||||
font-size: 13px;
|
||||
font-family: verdana, arial, "sans-serif";
|
||||
margin: 10px 30px 10px 20px;
|
||||
}
|
||||
h4 {
|
||||
color: #999999;
|
||||
font-size: 13px;
|
||||
font-family: verdana, arial, "sans-serif";
|
||||
margin: 10px 30px 10px 20px;
|
||||
}
|
||||
table {
|
||||
border: 0px #999999;
|
||||
}
|
||||
a {
|
||||
text-decoration : none;
|
||||
}
|
||||
a:link {
|
||||
color: #FF5906;
|
||||
}
|
||||
a:visited {
|
||||
color: #FF5906;
|
||||
}
|
||||
a:active {
|
||||
background-color:transparent;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration : underline;
|
||||
}
|
||||
a.soft, a.soft:visited, a.soft:link {
|
||||
TEXT-DECORATION: none;
|
||||
COLOR: #000000;
|
||||
}
|
||||
a.soft:hover {
|
||||
TEXT-DECORATION: underline;
|
||||
BACKGROUND-COLOR: transparent;
|
||||
COLOR: #000000
|
||||
}
|
||||
#header {
|
||||
background-color: #FF7A22;
|
||||
background-image: url("header_bg.jpg");
|
||||
background-repeat: no-repeat;
|
||||
background-position: 226px 0px;
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
}
|
||||
#header #banner {
|
||||
float: right;
|
||||
margin: 8px 5px 0px 0px;
|
||||
}
|
||||
#logo {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left: 4px;
|
||||
z-index: 200;
|
||||
}
|
||||
#services {
|
||||
position: absolute;
|
||||
top: 16px;
|
||||
right: 10px;
|
||||
z-index: 200;
|
||||
}
|
||||
#filter {
|
||||
position: absolute;
|
||||
top: 65px;
|
||||
right: 30px;
|
||||
z-index: 220;
|
||||
}
|
||||
#filter_label {
|
||||
position: absolute;
|
||||
top: 61px;
|
||||
right: 215px;
|
||||
z-index: 220;
|
||||
}
|
||||
#apply {
|
||||
position: absolute;
|
||||
top: -5px;
|
||||
right: -30px;
|
||||
z-index: 220;
|
||||
border: none;
|
||||
}
|
||||
#navigation_bar {
|
||||
background-color: #f0f0f0;
|
||||
border-bottom: 1px dotted #999999;
|
||||
height: 20px;
|
||||
}
|
||||
#separator_bar {
|
||||
background-color: #ffffff;
|
||||
border-bottom: 1px dotted #999999;
|
||||
height: 20px;
|
||||
}
|
||||
#footer {
|
||||
clear: both;
|
||||
border-top: 1px dotted #999999;
|
||||
}
|
||||
#footer_bar {
|
||||
height: 20px;
|
||||
width: 100%;
|
||||
background-color: #FF7A22;
|
||||
}
|
||||
.attribute_link a {
|
||||
color: #606060;
|
||||
text-decoration: none;
|
||||
}
|
||||
.attribute_link a:hover {
|
||||
color: #606060;
|
||||
border-bottom: 1px dotted #999999;
|
||||
}
|
||||
.hide {
|
||||
display: none;
|
||||
}
|
||||
.spacer {
|
||||
clear: both;
|
||||
}
|
||||
.spacer hr {
|
||||
display: none;
|
||||
}
|
||||
.center {
|
||||
text-align: center;
|
||||
}
|
||||
69
dcm4chee/default/deploy/jmx-console.war/style_master.css
Normal file
69
dcm4chee/default/deploy/jmx-console.war/style_master.css
Normal file
@@ -0,0 +1,69 @@
|
||||
BODY {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 14px;
|
||||
background-color : White;
|
||||
}
|
||||
|
||||
H1{
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 25px;
|
||||
font-weight: bold;
|
||||
color: #000099}
|
||||
H2 {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: #000000
|
||||
}
|
||||
H3 {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 17px;
|
||||
font-weight: bold;
|
||||
color: #000000
|
||||
}
|
||||
TH {
|
||||
background-color : #000099;
|
||||
color: #DEB887;
|
||||
font-weight: bold;
|
||||
}.bg_table {
|
||||
background-color : #DEB887;
|
||||
}
|
||||
}.bg_cell{
|
||||
background-color : #ffffff;
|
||||
}
|
||||
|
||||
* .error {
|
||||
color: red;
|
||||
}
|
||||
|
||||
A:ACTIVE {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 14px;
|
||||
color:Red;
|
||||
background-color: #DEB887;
|
||||
text-decoration : underline;
|
||||
font-weight:bold;
|
||||
}
|
||||
A:HOVER {
|
||||
font-family:Arial, Helvetica, sans-serif;
|
||||
font-size: 14px;
|
||||
color:Red;
|
||||
text-decoration : underline;
|
||||
font-weight:bold;
|
||||
}
|
||||
A:LINK {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 14px;
|
||||
color:#000099;
|
||||
text-decoration : underline;
|
||||
font-weight:bold;
|
||||
}
|
||||
A:VISITED {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 14px;
|
||||
color:Purple;
|
||||
text-decoration : underline;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user