[jboss-user] [Management, JMX/JBoss] - method overloading issue in 4.2.2 ? Wrong target message. Wh
jbosseron
do-not-reply at jboss.com
Sun Jan 11 14:02:38 EST 2009
I am trying to create a MBean and test in the JMX console.
It deploys fine and shows up in the JMX console,
but as soon as I call the method with no argument and later tries to call the method with an argument it fails with a "wrong target" error message.
Is it a known issue or am I doing something wrong here?
It works fine if I rename one of the methods so there is no overloading...
I'm using 4.2.2.GA and JDK1.5.0_14
Here is test code that will break once jared up and deployed(2 files):
//Test.java
package test;
public interface Test {
public String aMethod(String aString);
public String aMethod();
}
//TestMBean.java
package test;
import org.jboss.annotation.ejb.Management;
import org.jboss.annotation.ejb.Service;
@Service(objectName="A:service=test")
@Management(Test.class)
public class TestMBean implements Test{
public String aMethod(String string) {
return "Test with arg " +string;
}
public String aMethod() {
return "Test with no arg";
}
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200838#4200838
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200838
More information about the jboss-user
mailing list