<< Back to previous view

[JMX-2] java.jmx: Invoke doesn't work on methods with different parameter types. Created: 31/Aug/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-Explictly-pass-an-Object-array-as-the-parameters-for.patch    
Patch: Code
Approval: Accepted


The jmx library currently doesn't work on mbean methods that have multiple parameters with different types. This is due to the fact that into-array is used without specifying an array type. If the parameters are of different types, into-array will attempt to create an array with the type of the first parameter and fail when the second parameter is not the same.

We should just specify the array type as Object, since that is what the invoke method requires anyway.

http://download.oracle.com/javase/6/docs/api/javax/management/MBeanServerConnection.html#invoke(javax.management.ObjectName, java.lang.String, java.lang.Object[], java.lang.String[])

Comment by Nick Bailey [ 22/Feb/12 11:08 AM ]


Generated at Mon Jan 22 04:55:23 CST 2018 using JIRA 4.4#649-r158309.