2 Replies Latest reply on Feb 11, 2003 12:42 PM by huni:-)

    Beginner problem with HA-JNDI

    huni:-)

      Hi!

      I tried several times to connect to HA-JNDI and it failed every time. Perhaps someone has the missing link for me. I have 4 Linux Nodes with JBoss-3.2.0RC2 default cluster settings. Now, I want to connect with my client to a simple stateless session bean. (Does nothing except a return value).

      The client looks as follows

      ...

      public static InitialContext getClusterContext() throws NamingException {
      Properties prop = new Properties();
      prop.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
      prop.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
      prop.put(Context.PROVIDER_URL,"jboss1.schlund.de:1100"); //HA-JNDI port.
      InitialContext ctx = new InitialContext(prop);
      return ctx;
      }

      ...

      Object ref = getClusterContext().lookup("ejb/jboss/simple/stateless/SessionRequest");
      SessionRequestHome home = (SessionRequestHome) PortableRemoteObject.narrow(ref,SessionRequestHome.class);
      SessionRequest sR = home.create();

      ...

      > jbossall-client.jar is in the classpath


      Error:

      javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]