title: Cannot connect to Tibco JMS server
body: <p>I have a java application which does some JMS send&amp;receive work. But I found an interesting problem. For example, I set the following for java.naming.provider.url.</p>
  
  <pre><code>tcp://hostnameA.foo.bar:7222
  </code></pre>
  
  <p>But I got the error as below. Only hostname in it, not the full qualified domain name.</p>
  
  <pre><code>javax.jms.JMSException: Failed to connect to the server at tcp://hostnameA:7222
  </code></pre>
  
  <p>Unless I add hostnameA in my hosts file manually, it won't connect to Tibco server.</p>
  
  <p>How can I fix it?</p>
  
  <p>Thanks in advance.</p>