1 Reply Latest reply on Nov 13, 2002 10:55 AM by slaboure

    server side HA-JNDI

    pauloh


      Hello,

      we have a Servlet that makes concurrent calls to a clustered EJB (Stateless). But, everytime I run this Servlet the EJBs are always executed locally (on the same machine where the Servlet is) and no load-balancing is made. Has it something to do with local JNDI vs HA-JNDI?

      I'm accessing HA-JNDI from the server side as explained in the "JBoss Clustering" document, and the EJB's create() is called only once (multiple calls are made only to the remote method, one in each thread).

      Please, would anybody help me to find out a solution for this?


      String urlProvider = "schindler:1100,ubatuba:1100";
      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, urlProvider);
      InitialContext ctx = new InitialContext(p);


      I appreciate any tip or suggestion from you (ASAP!)

      Thanks a lot!

      Paulo

        • 1. Re: server side HA-JNDI
          slaboure

          why do you want JBoss to use a distant EJB if one is available locally? This is a feature of clustering (in the proxy code) if you don't want this, run your servlet engine as a separate process/JVM as your EJB engine.

          Cheers,

          sacha