2 Replies Latest reply on Jun 22, 2016 9:38 PM by lcheng_nj

    [ejb cluster] Does wildfly9.0.2 supports load balance policy "FirstAvailable" as JBoss4.2.2

    lcheng_nj

      Hi, all

         We have one cluster environment, say there are two nodes: node1, node2, We deploy one stateless ejb on these nodes. The client invoke ejb with following sequence

         1. Look up ejb, and cache it

         2. Invoke ejb business logic method1

             invoke ejb business logic method2

             ....

        What we expected is that at step2, we always invoke ejb on the same JBoss(wildfly) server. E.g. If method1 is invoked on node1, then method2 is also invoked on node1.

       

         We can get this behavior with JBoss4.2, with following setting. I checked the jboss source code, the FirstAvaiable policy will first pick up one server and then always use this server once this server is running.

                   <home-load-balance-policy>

                       org.jboss.ha.framework.interfaces.FirstAvailable

                   </home-load-balance-policy>

                   <bean-load-balance-policy>

                       org.jboss.ha.framework.interfaces.FirstAvailable

                   </bean-load-balance-policy>

        

      However, with Wildfly9.0.2, I'm don't know how to achieve this or whether is behavior is still supported.  Please help.