1 Reply Latest reply on Apr 13, 2003 7:28 PM by slaboure

    [b]Can not achieved the EJB load balance![/b]

    xbird

      My develop enviroment is win2000+sp2,jboss-3.0.3_tomcat-4.1.12.
      There is two machine,one called "ctotest" another called "caowei".
      I deploy the same ear file in these two machines.
      the deploy folder is: $jboss_home\server\all\deploy\farm.
      And i use the default clustering configuration of the jboss "all" mode.
      my jboss.xml is looks like follows:
      **********************************************************************

      <ejb-name>StaffProfile</ejb-name>
      <jndi-name>ejb/StaffProfile</jndi-name>
      True

      **********************************************************************

      And my client use follow codes to lookup the HA-JNDI.
      **********************************************************************
      ......
      property.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
      property.put("java.naming.provider.url", "ctotest:1100,caowei:1100");
      property.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
      property.put("jnp.socketFactory", "org.jnp.interfaces.TimedSocketFactory");
      InitialContext jndiContext = new InitialContext(property);
      remoteHome = jndiContext.lookup(jndiName);
      .......
      (Here also a problem confused me, the document said that we can leave the "java.naming.provider.url" empty, the client will
      autodiscovery the HA-JNDI server in the local network.But it doesn't work.So i have to explicitly to donote the jndi server. )
      **********************************************************************

      All works well ,but it seems no load balance achieved!
      I simular 50 concurrent user to login the system.But judge from console all these work is done
      on machine caowei.
      Nothing print on the machine ctotest.it just show the info like :
      15:39:33,767 INFO [DefaultPartition] New cluster view: 1 ([ctotest:1241, CAOWEI:4047])
      15:39:33,767 INFO [DefaultPartition:ReplicantManager] Dead members: 0

      and if i shut down jboss on the ctotest machine,the application still runs well, but jboss will give me a warn message:
      15:45:01,546 WARN [NamingContext] Failed to connect to ctotest:1100
      ........................................

      How i can achived the load balance?
      Would somebody give me a hand? So appreciated!
      my mail is tec_caowei@hotmail.com