ASF Bugzilla – Attachment 28173 Details for
Bug 38216
Extend Jmxproxy to allow call of MBean Operations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
2012-01-19_tc8_JMXProxyServlet.patch
2012-01-19_tc8_JMXProxyServlet.patch (text/plain), 1.97 KB, created by
Konstantin Kolinko
on 2012-01-19 07:19:33 UTC
(
hide
)
Description:
2012-01-19_tc8_JMXProxyServlet.patch
Filename:
MIME Type:
Creator:
Konstantin Kolinko
Created:
2012-01-19 07:19:33 UTC
Size:
1.97 KB
patch
obsolete
>Index: java/org/apache/catalina/manager/JMXProxyServlet.java >=================================================================== >--- java/org/apache/catalina/manager/JMXProxyServlet.java (revision 1233156) >+++ java/org/apache/catalina/manager/JMXProxyServlet.java (working copy) >@@ -126,8 +126,14 @@ > try { > ObjectName oname = new ObjectName(onameStr); > Object value = mBeanServer.getAttribute(oname, att); >+ String valueStr; >+ if (value != null) { >+ valueStr = value.toString(); >+ } else { >+ valueStr = "<null>"; >+ } > writer.println("OK - Attribute get '" + onameStr + "' - " + att >- + "= " + MBeanDumper.escape(value.toString())); >+ + "= " + MBeanDumper.escape(valueStr)); > } catch (Exception ex) { > writer.println("Error - " + ex.toString()); > ex.printStackTrace(writer); >@@ -193,8 +199,12 @@ > } > > Object retVal = mBeanServer.invoke(oname,op,values,signatureTypes); >- writer.println("OK - Operation " + op + " returned:"); >- output("", writer, retVal); >+ if (retVal != null) { >+ writer.println("OK - Operation " + op + " returned:"); >+ output("", writer, retVal); >+ } else { >+ writer.println("OK - Operation " + op + " without return value"); >+ } > } catch( Exception ex ) { > writer.println("Error - " + ex.toString()); > ex.printStackTrace(writer); >@@ -207,7 +217,13 @@ > output(" " + indent, writer, obj); > } > } else { >- writer.println(indent + result.toString()); >+ String strValue; >+ if (result != null) { >+ strValue = result.toString(); >+ } else { >+ strValue = "<null>"; >+ } >+ writer.println(indent + strValue); > } > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 38216
:
19340
| 28173