<< Back to previous view

[JMX-1] java.jmx: Invoke doesn't handle overloaded mbean methods Created: 01/Sep/11  Updated: 22/Feb/12  Resolved: 22/Feb/12

Status: Resolved
Project: java.jmx
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Nick Bailey Assignee: Nick Bailey
Resolution: Completed Votes: 0
Labels: None

Attachments: Text File 0001-Allow-invoking-overloaded-jmx-operations.patch    
Patch: Code
Approval: Accepted

 Description   

The invoke function in java.jmx won't work with overloaded mbean functions. This is because when you call invoke on an mbean operation you pass the method signature with the call. Our library always grabs the signature from the first operation with that name. If you try and invoke an overloaded method that isn't the first in the list, The parameter types/number won't match the signature that is passed and you'll get an exception.

I think perhaps the easiest/most non-intrusive solution is to add an 'invoke-with-signature' method and let the user pass in the parameter type list. I'm not exactly sure why we don't send the signature based on the parameters passed by the user anyway though. Perhaps the best solution is to just always do that.



 Comments   
Comment by Nick Bailey [ 15/Sep/11 1:46 AM ]

This patch also includes the patch I attached to JMX-2. The patch from that ticket was required to actually be able to test this functionality.

Comment by Nick Bailey [ 22/Feb/12 10:58 AM ]

Committed.

Generated at Sat Nov 22 22:53:10 CST 2014 using JIRA 4.4#649-r158309.