6 Replies Latest reply on Mar 26, 2014 12:04 PM by Wolf-Dieter Fink

    Calling a remote clustered EJB from a cluster

    Graeme Wallace Newbie

      I've read the following doc

       

      https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+server+instance

       

      which suggests you tie a socket binding to the destination host.

       

      What happens though, if you want to call a clustered EJB ? How do you configure that up ?

        • 1. Re: Calling a remote clustered EJB from a cluster
          Joseph Fouts Novice

          I am also looking to find a solution to a similar situation.

           

          I have a cluster of as-7 servers.

          Depoloyed on each server is an app with a SLSB that calls a clustered SLSB(Asynchronous).

          I need the calls to the clustered SLSB to be load balanced so that each server in the cluster are accessed

          in a sequencial order.  Server 1... Server 2... Server 3...

          This was like the RoundRobin load balance in JBoss 5.1.

           

          I have read lots of docs but I am still have no idea to set this up.

           

          Any help would be greatly appreciated.

           

          Thanks.

          • 3. Re: Calling a remote clustered EJB from a cluster
            Joseph Fouts Novice

            Thanks for the link Jaikiran.

             

            So if I use the client server destination server example I'm still not clear how this works with a cluster of servers.

             

            Would I have to create an outoutbound-socket-binding for each server in the cluster?

             

            <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

                <outbound-socket-binding name="remote-ejb">

                      <remote-destination host="server1IP" port="4447"/>

                </outbound-socket-binding>

                <outbound-socket-binding name="remote-ejb">

                      <remote-destination host="server2IP" port="4447"/>

                </outbound-socket-binding>

                <outbound-socket-binding name="remote-ejb">

                      <remote-destination host="server3IP" port="4447"/>

                </outbound-socket-binding>

            </socket-binding-group>

             

             

            How is load balancing handled to the destination servers?

            Can I support roundRobin?

             

            Thanks again for your help.

            • 4. Re: Calling a remote clustered EJB from a cluster
              Graeme Wallace Newbie

              It would be nice to get some clarity around this.

               

              How do you specify more than one host in a cluster so that the entire deployment wont fail if the named machine in the XML is down ?

               

              How do you do load balancing ?

               

              ie same questions as Joseph asked.

              • 5. Re: Calling a remote clustered EJB from a cluster
                arhi smece Newbie

                ++ on need for clarity .. is there a way to avoid SPOF?

                • 6. Re: Calling a remote clustered EJB from a cluster
                  Wolf-Dieter Fink Master

                  At the moment you need to specify the initial connected hosts inside the jboss-ejb-client.xml in the application packaging.

                  So you have two (or more) ejb-recievers which need the same amount of outbound* stuff in the server configuration.

                   

                  The load balancing will happen then automaticaly to all cluster members, a random policy is used.

                  The client decided which server is used, there is no LB handled on the server side.

                  You might override the LB policy by implementing a ClusterNodeSelector, but this is not necessary as the random approach will have the same results over the time.

                   

                  There is EJBCLIENT-47 to simplify the cluster configuration, from my perspective the client should not know whether there is a cluster or single server called.