0 Replies Latest reply on Jun 26, 2003 7:00 PM by rob_canoe

    Accessing Message Queue on remote machine

    rob_canoe

      I have got a mental block about how I can access a JMS queue on a remote machine. Sure, I can do something like this:

      Properties env = new Properties();
      env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
      env.put("java.naming.provider.url", "10.0.0.9:1099");
      env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");

      InitialContext initialContext = new InitialContext(env);

      and get a connection, but that only works if I can see the machine at 10.0.0.9

      My client code wants to be able to post a message to the Queue, without having to worry about whether the remote machine is currently available.

      I imagine that I want to post to a queue on localhost, which will then at some later date, get posted on to the target queue at 10.0.0.9, when the connection becomes available again.

      Any suggestions gratefully received.