title: Query on ThreadSafeClientConnManager (Apache HttpClient 4.1.1)
body: <p>Am using ThreadSafeClientConnManager
  Apache HttpComponenets-Client4.1.1 for my connection pool.</p>
  
  <p>When am releasing the connection back to the pool i say:</p>
  
  <blockquote>
    <p>cm.releaseConnection(client,-1,TimeUnit.SECONDS); 
    cm.closeExpiredConnections(); cm.closeIdleConnections(20,
    TimeUnit.SECONDS);</p>
  </blockquote>
  
  <p>[Here cm is object of ThreadSafeClientConnManager]
  and as mentioned in the javadoc  releaseConnection(ManagedClientConnection conn,          long validDuration,TimeUnit timeUnit) am setting valid duration to -ve (&lt;=0) value.</p>
  
  <p>But when i see server logs i find that:</p>
  
  <p>org.apache.http.impl.conn.DefaultClientConnection] Connection shut down
  2011-08-17 14:12:48.992 DEBUG   Other        Thread-257 org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager Released connection is not reusable.
  2011-08-17 14:12:48.992 DEBUG   Other        Thread-257 org.apache.http.impl.conn.tsccm.ConnPoolByRoute Releasing connection [HttpRoute[{}->http://server-name:port][null]
  2011-08-17 14:12:48.992 DEBUG   Other        Thread-257 [org.apache.http.impl.conn.tsccm.ConnPoolByRoute] Notifying no-one, there are no waiting threads
  2011-08-17 14:12:48.993 DEBUG   Other        Thread-257 [org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager] Closing expired connections
  2011-08-17 14:12:48.993 DEBUG   Other        Thread-257 [shaded.org.apache.http.impl.conn.tsccm.ConnPoolByRoute] Closing expired connections
  2011-08-17 14:12:48.993 DEBUG   Other        Thread-257 [shaded.org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager] Closing connections idle longer than 20 SECONDS</p>
  
  <p>Here i see in the logs that "Released connection is not reusable"
  Does that mean that "-1 " is not making the connection reusable  and connections are closed instead of returning to pool?
  If so can any one please suggest how can i make it reusable.</p>
  
  <p>Thanks in advance.</p>