1 Reply Latest reply on Nov 6, 2002 1:23 PM by Paulo Henrique

    JA-HNDI round-robin behavior?

    don zaremba Newbie


      Is the default behavior for HA-JNDI lookups to be round-robined amoung the nodes in the cluster?

      I have a reference to an intialial context and each lookup I do binds to a different node in the cluster. The behavior I wanted was to bind to the same server each time and only in go to other nodes for fault-tolerance.

      Is this behaviour possible and I haven't configured my cluster correctly?

        • 1. Re: JA-HNDI round-robin behavior?
          Paulo Henrique Newbie


          Hi,

          I think you could use the FirstAvailable load-balancing instead of Round-Robin... All you have to do is to change your jboss.xml like this:

          True
          <cluster-config>
          <partition-name>DefaultPartition</partition-name>
          <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>
          </cluster-config>


          By the way, I have the opposite problem you have. I've been trying but I couldn't make the HA-JNDI happen yet. Would you pass me part of the source code that you're using to access the EJB? Where/how are you setting the InitialContext and the calls to create() and the remote method ???
          I'm trying to do it from the server-side (Servlet), but with no success...

          Thanks in advance!!

          Paulo