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: jcompag...@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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to