]
Paul Ferraro reopened JBAS-6792:
--------------------------------
Reverting fix - causing regressions with remote jmx notifications
callMethodOnPartition on MBeans extending HAServiceMBeanSupport not
working
---------------------------------------------------------------------------
Key: JBAS-6792
URL:
https://jira.jboss.org/jira/browse/JBAS-6792
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Clustering
Affects Versions: JBossAS-5.1.0.Beta1
Reporter: Galder ZamarreƱo
Assignee: Paul Ferraro
Priority: Critical
Fix For: JBossAS-5.1.0.CR1
Trying to call a method cluster wide on a service that extends HAServiceMBeanSupport
fails with a
message like this:
2009-04-15 18:22:12,325 ERROR [org.jgroups.blocks.MethodCall]
(Incoming-19,127.0.0.3:47610) found no method called echo in class
org.jboss.ha.framework.server.HAServiceImpl$RpcHandler with (java.lang.Boolean) formal
parameters
Looks like the handler linked in HAPartition is not the correct one or not able to cope
with remote
method calls.
Example:
public interface EchoMBean extends HAServiceMBean
{
boolean echo(boolean echo);
}
public class Echo extends HAServiceMBeanSupport implements EchoMBean
{
public boolean echo(boolean echo)
{
return echo;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<server>
<mbean code="org.jboss.test.cluster.rspfilter.Echo"
name="cluster.rspfilter:service=Echo">
<attribute name="HAPartition"><inject
bean="HAPartition"/></attribute>
</mbean>
</server>
public void testTrueEcho() throws Exception
{
MBeanServerConnection[] adaptors = this.getAdaptors();
ObjectName on = new ObjectName("cluster.rspfilter:service=Echo");
Object[] args = new Object[] {"echo", new Object[] {true}, new Class[]
{boolean.class}};
String[] signature = new String[] {String.class.getName(),
Object[].class.getName(), Class[].class.getName()};
List resps = (List) adaptors[0].invoke(on, "callMethodOnPartition", args,
signature);
log.debug("Response list: " + resps);
assertEquals(1, resps.size());
if (resps.get(0) instanceof Exception)
{
throw (Exception)resps.get(0);
}
assertTrue(((Boolean)resps.get(0)).booleanValue());
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: