title: Setting the URL for a JMS connection
body: <p>The <a href="http://www.sw-engineering-candies.com/snippets/java/hello-world-java-message-service-with-open-mq" rel="nofollow">JMS Hello World</a> example shows producers and consumers sending and consuming messages; this is how they seem to create the connection:</p>
  
  <pre><code>ConnectionFactory cf = new com.sun.messaging.ConnectionFactory();
  Connection connection = cf.createConnection();
  </code></pre>
  
  <p>How specify the address and parameters of the remote JMS server?</p>
  
  <p>I want to create an encrypted and compressed connection to an OpenMQ server that is running on another machine.  Ideally I would like to use both client and server authentication.</p>