2 Replies Latest reply on Mar 6, 2005 11:47 PM by Santosh Puranik

    EJB Clustering Blues

    Santosh Puranik Newbie

      Hi Forum,

      This has been bugging me for days. I have Jboss servers running on two Win2k machines in the clustered configuration. I have a simple session bean deployed in the farm directory. I'm able to look up the bean's home and remote interfaces. I've specified round robin balancing policy in the jboss.xml file. However, the bean in only one machine is accessed. (No signs of round-robin). Here is how I look up the bean in the client (a servlet):

      Properties p = new Properties();
      p.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
      p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
      //p.put(Context.PROVIDER_URL, null); // HA-JNDI port.
      p.setProperty("provider_url","");
      p.setProperty("jnp.partitionName","DefaultPartition");
      p.setProperty("jnp.discoveryGroup","230.0.0.4");
      p.setProperty("jnp.discoveryPort","230.0.0.4:1102");
      InitialContext ctx = new InitialContext(p);
      Object objref = ctx.lookup("CalcBean");
      homecalc = (CalcHome)PortableRemoteObject.narrow(objref, CalcHome.class);

      What could be the problem. Looking forward to an answer.

      Thanks in Advance,

      Santosh