Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-1371

Default load balance policy for SLSBs should be RoundRobin, not RandomRobin

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.0.0-Beta7
    • AS 4.2.2.GA, AS 5.0.0.Beta4
    • Clustering, core
    • None
    • Low

      Looking at StatelessClusterProxyFactory, it appears that the
      default load balance policy for SLSBs has changed from EJB2.
      For EJB2s it was Round Robin, whereas EJB3 seems to define
      it as Random Robin:

      Clustered clustered = (Clustered) ((Advisor)getContainer()).resolveAnnotation(Clustered.class);
      ...
      if (clustered.loadBalancePolicy() == null || clustered.loadBalancePolicy().equals(LoadBalancePolicy.class))
      {
      lbPolicy = new RandomRobin();
      }
      else
      {
      lbPolicy = (LoadBalancePolicy) clustered.loadBalancePolicy().newInstance();
      }

      I can't see a reason for us to change the default in between EJB versions.

            rh-ee-galder Galder ZamarreƱo
            rh-ee-galder Galder ZamarreƱo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: