title: how to prevent java.net.ConnectException: Connection timed out?
body: <p>can any body explain java.net.ConnectException: Connection timed out</p>
  
  <pre><code>Caused by: java.net.ConnectException: Connection timed out 
      at java.net.PlainSocketImpl.socketConnect(Native Method) 
      at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:337) 
      at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:198) 
      at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180) 
      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391) 
      at java.net.Socket.connect(Socket.java:579) 
      at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at net.sourceforge.jtds.jdbc.SharedSocket.createSocketForJDBC3(SharedSocket.java:289) 
      at net.sourceforge.jtds.jdbc.SharedSocket.(SharedSocket.java:250) 
      at net.sourceforge.jtds.jdbc.ConnectionJDBC2.(ConnectionJDBC2.java:297)
  </code></pre>