0 Replies Latest reply on Jun 1, 2007 8:02 AM by shribala

    Not Routed to my Second Node in Client side Interceptors clu

    shribala

      I have given two nodes In Provider URL of my client class.
      When the client class is invoked more than 5 times parallely, all the request is always routed to the first node only.
      By No chance it is going to the second node.

      If i change the IP address of first node to some fake IP Address which actually does not exist in my Network, the client request is redirected to Second Node.

      Please help me out in how to test that the client side Intercepors clustering is routed to my second node, third node, etc...


      For reference:

      Client Class

      import javax.naming.Context;
      import javax.naming.*;
      import javax.rmi.*;
      import java.util.*;

      import com.arbitron.ppm.ops.sampling.*;

      class CalculatorClient {
      static int j=0;
      public static void main(String args[]) throws Exception {
      CalculatorClient t = new CalculatorClient();
      t.go();
      }

      public void go() throws Exception {
      Context ctx = getContextExternalClient();
      System.out.println("Hi");
      CalculatorHome calculatorHome = (CalculatorHome) PortableRemoteObject.narrow(ctx.lookup("Calculator"), CalculatorHome.class);
      Calculator calculator = calculatorHome.create();
      String answer = calculator.add(4, 5);
      System.out.println("answer : "+ answer);
      }

      private Context getContextExternalClient() throws Exception {
      Properties p = new Properties();
      p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      p.put(Context.PROVIDER_URL, "10.239.34.138:1100,10.239.23.160:1100");
      p.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
      Context ctx = new InitialContext(p);
      return ctx;
      }
      }