5 Replies Latest reply on Sep 19, 2007 4:57 PM by smarlow

    JBAS-4719 (JBCLUSTER-186) Invoker implementations need equal

    smarlow

      Hi,

      I created JBAS-4719 yesterday for a problem that I hit in two different ways. PooledInvokerProxy doesn't have an equals method which means that comparing two instances with the same underlying address will not match.

      This happens in the load balancers. A cluster membership change introduces a new arraylist of targets. After that occurs, attempts to find the current server in the new arraylist of targets will fail, even though the current server address may exist in the new arraylist of targets.

      The other case is during fail-over we attempt to remove a bad server from the list of servers, but fail to remove the server for the same reason.

      I attached a patch for PooledInvokerProxy to address JBAS-4719 issue.

      The list of different invokers (in 4.2 branch) are:

      HttpInvokerProxy
      HttpInvokerProxyHA
      JRMPInvoker
      JRMPInvokerHA
      JRMPInvokerProxy
      JRMPInvokerProxyHA
      LocalInvoker
      UnifiedInvokerProxy
      UnifiedInvokerHAProxy

      Should we try to add equals/hashCode to all of the invokers?

      It looks like UnifiedInvokerProxy could implement equals using its "locator" member variable. I'm not sure about the other ones.

      Comments?

      Scott