You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2015/11/03 13:44:35 UTC
[Bug 58577] New: JMX Proxy Servlet can't handle overloaded methos
https://bz.apache.org/bugzilla/show_bug.cgi?id=58577
Bug ID: 58577
Summary: JMX Proxy Servlet can't handle overloaded methos
Product: Tomcat 8
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P2
Component: Manager
Assignee: dev@tomcat.apache.org
Reporter: jcompagner@apache.org
currently the JMXProxy when invoking an operation does this:
ObjectName oname=new ObjectName( onameStr );
MBeanOperationInfo methodInfo =
registry.getMethodInfo(oname,operation);
MBeanParameterInfo[] signature = methodInfo.getSignature();
so it calls the registry for a method info for a specific bean and operation
that Registry does this:
public MBeanOperationInfo getMethodInfo( ObjectName oname, String opName )
{
MBeanInfo info=null;
try {
info=server.getMBeanInfo(oname);
} catch (Exception e) {
log.info( "Can't find metadata " + oname );
return null;
}
MBeanOperationInfo attInfo[]=info.getOperations();
for( int i=0; i<attInfo.length; i++ ) {
if( opName.equals(attInfo[i].getName())) {
return attInfo[i];
}
}
return null;
}
which is wrong because that just returns the first hit by name.
I think at least the patch should be that that getMethodInfo gets a 3th
argument which is the number of arguments it should have. Or better an array of
Types where the parameters should map on. (but that can be in this scenario
tricky because the caller site doesn't know the types)
Or it should just return all a Array of MBeanOperationInfo of all hits for that
name and let the caller handle it what it can use or call.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 58577] JMX Proxy Servlet can't handle overloaded methods
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58577
Christopher Schultz <ch...@christopherschultz.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|JMX Proxy Servlet can't |JMX Proxy Servlet can't
|handle overloaded methos |handle overloaded methods
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 58577] JMX Proxy Servlet can't handle overloaded methods
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58577
Christopher Schultz <ch...@christopherschultz.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #1 from Christopher Schultz <ch...@christopherschultz.net> ---
I chose to make the simplest possible change for now, which is to check the
argument count. It's not entirely possible to look for the exact right types
because the parameter values come from the request as String values.
With enough code, it might be possible to find a list of candidate methods,
then attempt to convert the parameter strings into the target types for each
one, and see if any of them succeed (or skip the failures) and invoke that
particular type of operation. On the other hand, MBean operations should
probably be designed to avoid such conflicts.
This is fixed in e16472f93659c053f4af20ec5bacc08c342a0b90
Will be in 9.0.31
Will be in 8.5.51
Will be in 7.0.100
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 58577] JMX Proxy Servlet can't handle overloaded methos
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58577
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org