[jboss-user] [JBoss Messaging] - How to send messages to a remote clustered queue (using HAJN

TheOverlord do-not-reply at jboss.com
Wed Jul 30 13:58:23 EDT 2008


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?



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4167703#4167703

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4167703



More information about the jboss-user mailing list