You have to lookup the connection factory
in the jndi tree of the jboss instance
you want to receive the messages.
One solution would be to only deploy jbossmq
on one machine and use HAJNDI on port 1100
in fact I was looking in JBoss configuration files if I couldn't set somewhere the JMS publisher's destination provider, with your advice, I managed to do it directly into the code:
java.util.Properties p = new java.util.Properties();
//Now use those properties to create
//a JNDI InitialContext with the server.
ctx = new InitialContext( p );