2 Replies Latest reply on Sep 24, 2003 8:22 AM by aav

    Failed to send message from one JBOSS to another

    aav Newbie

      I try send message from one JBOSS to another.
      Exception begin when I try lookup "ConnectionFactory" on InitialContext,
      which is i create:
      Properties p = new Properties();
      p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      p.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
      p.put(Context.PROVIDER_URL, "jnp://"+host+":1099");
      return new javax.naming.InitialContext(p);
      And when I do
      iniCtx.lookup("ConnectionFactory")

      I have next:
      15:24:13,271 ERROR [STDERR] javax.naming.CommunicationException. Root exception is
      15:24:13,272 ERROR [STDERR] java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is:
      java.net.ConnectException: Connection refused
      15:24:13,273 ERROR [STDERR] at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
      15:24:13,274 ERROR [STDERR] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
      15:24:13,274 ERROR [STDERR] at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
      15:24:13,274 ERROR [STDERR] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)
      15:24:13,274 ERROR [STDERR] at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
      15:24:13,274 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:500)
      15:24:13,275 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:479)
      15:24:13,275 ERROR [STDERR] at javax.naming.InitialContext.lookup(InitialContext.java:347)
      and so on
      But if do the same on localhost - all works perfectly

      Hoping for help...