NonStop Servlets for JavaServer Pages (5.0) System Administrator's Guide
NonStop Servlets for JavaServer Pages (NSJSP) System Administrator’s Guide—525644-002
A-1
A JMXProxy Servlet
The JMX Proxy Servlet is a lightweight proxy that gets and sets NSJSP internal objects
by using JMX MBeans. Although the admin web application can perform most of the
functions, using the JMX Proxy Servlet simplifies writing control scripts (especially, if
you are monitoring and performing minor attribute changes).
The -DEnableJMXProxyServlet=true Java system property enables the
JMXProxy Servlet. The JMXProxy Servlet is disabled by default (property value set to
false). To enable set this property value to "true" in both the servlet.config and
nsjspadmin.config configuration files, located in the
iTPWS_INSTALL_DIR/conf/ directory.
The JMXProxy Servlet supports two commands:
•
JMX Query command
•
JMX Set command
JMX Query command
The JMX query command is invoked using the following URL:
http://<server>:<port>/manager/jmxproxy/?qry=<query>
<query> is the JMX query you wish to perform.
Examples:
qry=*:* -> to get all objects
qry=*:type=Connector,* -> to get all Connectors
qry=*:j2eeType=WebModule,* -> to get all web applications
JMX Set command
The JMX set command is invoked using the following URL:
http://<server>:<port>/manager/jmxproxy/?set=<MBean-name>&att=<attribute-
name>&val=<attribute-value>
<MBean-name> is the full name of the target JMX MBean.
<attribute-name> is the attribute name.
<attribute-value> is the new attribute value.
Examples:
http://localhost:8080/manager/jmxproxy/
?set=NSJSP:type=Valve,name=ErrorReportValve,host=localhost&at
t=debug&val=10
This command alters the debug attribute value of the value named
NSJSP:type=Valve,name=ErrorReportValve,host=localhost to 10.