1 Reply Latest reply on Aug 31, 2004 1:55 AM by anil.saldhana

    JBoss 3.2.x EJB load balancing behaviour. Documentation ques

    priceline

      JBoss 3.2.3 has been installed on Windows 2000

      I have a partition with three nodes and I have deployed a clustered stateless EJB in the partition. The deploy descriptor jboss. xml looks like

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.2//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd">

      <enterprise-beans>

      <ejb-name>CitySearch</ejb-name>
      <jndi-name>CitySearch</jndi-name>
      <invoker-bindings>

      <invoker-proxy-binding-name>clustered-stateless-rmi-invoker</invoker-proxy-binding-name>

      </invoker-bindings>
      true
      <cluster-config>
      <partition-name>PCLNPartition</partition-name>
      <home-load-balance-policy>
      org.jboss.ha.framework.interfaces.RoundRobin
      </home-load-balance-policy>
      <bean-load-balance-policy>
      org.jboss.ha.framework.interfaces.RoundRobin
      </bean-load-balance-policy>
      </cluster-config>

      </enterprise-beans>


      The client code below caches the remote proxy ( also mentioned in edition 7 JBoss AS clustering, page 57 ) and DOES seems to load balance the EJB correctly.

      Home myHome =....;

      Remote myRemote = myHome.create();

      while (jobToDo)
      {
      myRemote.doTheJob(...);
      }

      On the other the following code which recreates the remote proxy for each call DOES NOT seem to load balance properly. I see irregular behaviour. This is simliar to the behaviour that is supposed to be seen in JBoss 3.0.x. The documentation says that the implementation in 3.2.x should have corrected this behaviour.

      Home myHome =....;

      while (jobToDo)
      {
      Remote myRemote = myHome.create();
      myRemote.doTheJob(...);
      }

      I'm sure I might be missing something. Any pointers will be helpful. I saw this behaviour with 3.2.3 and 3.2.5.


      Thanks

      Divakar