3 Replies Latest reply on Feb 21, 2007 10:42 AM by Brian Stansberry

    Load Balancing using client Proxy

    Niraj A Newbie

      I have EJB's deployed on 3 machines in a cluster. I am accessing the same from a remote client using JNDI. I want to access the EJB's in such a way that in case one of the machine is down then the EJB's is fetched from other machines in the cluster. I don't want to hardcode the IP Address and port of a single machine in the cluster. In case any one can provide me some example solution for my problem the it would be great.

        • 1. Re: Load Balancing using client Proxy
          Brian Stansberry Master

          In jboss.xml, add

          <clustered>true</clustered>


          for each bean where you want this behavior. If you're using EJB3 you can use an @Clustered annotation on the bean class instead of XML.

          • 2. Re: Load Balancing using client Proxy
            Niraj A Newbie

            I have already used Xdoclet for configuring clustered to true in jboss.xml. But that's not exactly the problem. I will explain the problem with an example:
            1) I have three machines in cluster namely A, B and C.
            2) IP Address for Machine A is 192.168.10.1, B is 192.168.10.2 and for C is 192.168.10.3.
            3) All the three machines A, B and C are in cluster. EJB's are configured with clustered set to true and deployed on all the 3 machines.
            4) I have a JNDI Client machine. I am doing lookup using HA-JNDI.
            5) I specify the IP Address for access as 192.168.10.1 and port 1100.
            6) I configure Round Robin Load Balancing.
            7) In case an EJB is not there specific on one machine it will be fetched from the other.
            The problem is that in case Machine A(192.168.10.1) is down then I will not be able to do the lookup for EJB's. I want to have the access mechanism such that the lookup is generic. In case Machine A is down lookup should happen from Machine B or Machine C. I basiclly want some clarity on the access approach so that the lookup is generic.
            Any clarity on the approach would be really helpful.