Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-4719

Implementations of Invoker should implement equals as an equality check rather than relying on Object.equals, this is important for cluster fail-over support




      Part of how JRMPInvokerProxyHA handles fail-over includes removing the reference to the node that left the cluster. However, the dead node is not removed as an equality check is not implemented by certain Invoker implementations.

      The relevant code in JRMPInvokerProxyHA is

      protected void removeDeadTarget(Object target)

      { if (this.familyClusterInfo != null) this.familyClusterInfo.removeDeadTarget (target); }

      The code in familyClusterInfo is:

      public ArrayList removeDeadTarget(Object target)
      synchronized (this)

      { ArrayList tmp = (ArrayList) targets.clone(); tmp.remove (target); this.targets = tmp; this.isViewMembersInSyncWithViewId = false; }

      return this.targets;

      Since, we didn't include an equals test in many of the different Invoker implementations, the above "tmp.remove(target)" operation fails. The reason for the failure is due to the "targets" ArrayList changing on every invocation (to reflect the current cluster server membership list), a new "targets" is created (so of course comparing references later will not work.)

      A similar problem occurs with the EJB2 load balancers after a cluster membership changes.

      I think that these issues will be solved by implementing an equals test in the different invokers that can handle equality testing.

      PooledInvokerProxy should implement equals based on ServerAddress.

        Gliffy Diagrams


            Issue Links



                • Assignee:
                  smarlow Scott Marlow
                  smarlow Scott Marlow
                • Votes:
                  0 Vote for this issue
                  0 Start watching this issue


                  • Created: