[jboss-jira] [JBoss JIRA] Assigned: (JBAS-6792) callMethodOnPartition on MBeans extending HAServiceMBeanSupport not working

Brian Stansberry (JIRA) jira-events at lists.jboss.org
Wed Apr 15 13:26:17 EDT 2009


     [ https://jira.jboss.org/jira/browse/JBAS-6792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Stansberry reassigned JBAS-6792:
--------------------------------------

    Assignee: Brian Stansberry


> 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: Brian Stansberry
>            Priority: Critical
>             Fix For: JBossAS-5.1.0.GA
>
>
> 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: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       




More information about the jboss-jira mailing list