5 Replies Latest reply on Aug 1, 2008 3:16 AM by Tim Fox

    How to send messages to a remote clustered queue (using HAJN

    Mr. Overlord Newbie

      In trying to figure out how to send a message to a REMOTE clustered queue using HAJNDI from a JBoss AS (with no queue on it).

      So this is the setup:

      JBass AS (machine1) is sending a message to a clustered queue on (machine2 and machine 3).

      The clustered queues reside on machine2 and machine3 but not on machine1.

      machine2 and machine3 are part of the same partition cluster.

      machine1 is NOT part of the same cluster as machine2/machine3.


      So from machine1, i tried this:


      Hashtable properties = new Hashtable();
      properties.put("java.naming.provider.url", "machine2:1100, machine3:1100");
      properties.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
      properties.put("java.naming.factory.url.pkgs", "jboss.naming:org.jnp.interfaces");
      Context context = new InitialContext(properties);
      


      I tried to get the managed connection factory of the remote cluster but I couldn't find it using this code:

      // Thhis failed to find anything
      context.lookup("java:/JmsXA")
      


      I also need to lookup the remote queue and again I couldn't find anything
      // This failed
      context.lookup("queue/MyQueue");
      


      I'm totally confused.

      How do I do this?