title: Many TIME_WAIT connections in WS client
body: <p>I am developing a JAX-WS web service client. This client is a part of a web application deployed at Glassfish 3.2.1 server and is called from a servlet. The OS is Windows Server 2003, and I use JDK 6. It sends several hundreds requests in minute to the web service deployed on other machine.</p>
  
  <p>The problem is that the client generates a growing number of connections in TIME_WAIT status (I can see it in netstat). I thought that turning on the "keep-alive" option would solve the problem, but it did not happen - the WS client opens new connections instead of reusing connections in TIME_WAIT status. </p>
  
  <p>I tried to tune the option "maxConnections" in Glassfish, but it did not help. I have also tried JDK 7 with the same result.</p>
  
  <p>Is it possible to close connection immediately after client request completes, or to reuse existing connection in TIME_WAIT status? </p>