title: post message to a remote JMS provider
body: <p>I want to be able to send messages to a remote JBoss server (JBoss MQ).</p>
  
  <p>I can do it for a local one but i'm stuck when trying with a remote one.</p>
  
  <p>can anyone explain to me how to do it ?
  are there any specific steps to take ?</p>
  
  <p>[what i've tried so far]</p>
  
  <p>I need to send a message to a remote server's queue (running "JBoss MQ") so that it can process the message and act on it.</p>
  
  <pre><code>    Properties properties = new Properties();
      properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      properties.put(Context.URL_PKG_PREFIXES, "org.jnp.interfaces");
      properties.put(Context.PROVIDER_URL, "jnp://192.168.131.129:1299");
      InitialContext jndiContext = new InitialContext(properties);
  
      //[2] Look up connection factory and queue.
      ConnectionFactory connectionFactory = (ConnectionFactory)jndiContext.lookup("UIL2XAConnectionFactory");
      Queue queue = (Queue)jndiContext.lookup("Queue/DataTransferQueue");
  </code></pre>
  
  <p>but I get an exception when running the above code :
  (even though, I can ping the remote server).</p>
  
  <pre><code>javax.naming.CommunicationException: Could not obtain connection to any of these urls: 192.168.1.131.129:1299 and 
  discovery failed with error: javax.naming.CommunicationException: 
  Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] 
  [Root exception is javax.naming.CommunicationException: Failed to connect to server 192.168.1.131.129:1299 
  </code></pre>
  
  <p>Is there anything special to do to connect to a remote queue ?</p>