6 Replies Latest reply on Apr 25, 2006 12:02 AM by brian.stansberry

    SFSB load balancing partially works

    pathi

      Hi all,
      We have set up a JBoss cluster with version 4.0.3 and deployed a clustered "Stateful Session Bean".
      The problem is when the bean is available in the master node (the node we are requesting) load balancing doesn't work.
      But when we make it undeployed there and available in all other nodes it balances the load.
      This implies failover works fine and it balances the load in that situation.
      The other problem is that for the intial request, the bean should be available in the master node, otherwise it gives a lookup fail. After that it works even it is unavailable in the master node.
      Thanks for any reply.

        • 1. Re: SFSB load balancing partially works
          brian.stansberry

          I assume when you say "master node", the client that is accessing the SFSB is located in that node as well (e.g. a servlet).

          If JBoss detects that an EJB is in the colocated in the same JVM as the client accessing it, an optimization will take place that will ensure the colocated bean is always called. Only if the bean is unavailable will the calls be load balanced around the cluster.

          Re: the lookup, you need to do your lookup in HA-JNDI to find beans deployed on other nodes.

          • 2. Re: SFSB load balancing partially works
            susitha

            Thanks Brian for your quick reply.
            The first problem is fine. But now when we undeploy the bean from "Master node" while the process is going on it continues without a fail SOMETIMES. But often it doesn't work and it serves partially executed bean through the servlet. (That is not the complete servlet)
            Thanx
            Pathirana

            • 3. Re: SFSB load balancing partially works
              pathi

              Thanks Brian for your quick reply.
              The first problem is fine. But now when we undeploy the bean from "Master node" while the process is going on it continues without a fail SOMETIMES. But often it doesn't work and it serves partially executed bean through the servlet. (That is not the complete servlet)
              Thanx
              Pathirana

              • 4. Re: SFSB load balancing partially works
                brian.stansberry

                What do you mean "serves partially executed bean"? Please elaborate.

                • 5. Re: SFSB load balancing partially works
                  pathi

                  That means the servlet shows only part of the result . It doesn't get completed. Anyway thanks for trying to answer and at the moment I have "SOLVED THAT PROBLEM".
                  But still the problem due to OPTIMIZATION thing still exists. How to disable the optimization?

                  Pathirana

                  • 6. Re: SFSB load balancing partially works
                    brian.stansberry

                    See http://www.jboss.com/index.html?module=bb&op=viewtopic&t=80210. Please note the discussion at the end of the thread on how disabling this is usually a bad idea. If you can load balance at the web tier, using local calls to the EJB tier will be much more performant.