title: How can I test if my connection pool is working in a correct way?
body: <p>I'm implementing a SOAP client using Apache Axis 2. Since the SOAP client must handle heavy number of requests I am using a connection pool.</p>
  
  <p>To do that I had to set a few transport layer configuration of my stub that was generated from a WSDL file:</p>
  
  <pre><code>stub._getServiceClient().getOptions().setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Constants.VALUE_TRUE);
  
  MultiThreadedHttpConnectionManager connectionManager = new MultiThreadedHttpConnectionManager();
  connectionManager.getParams().setDefaultMaxConnectionsPerHost(MAX_CONNECTIONS_PER_HOST);
  connectionManager.closeIdleConnections(IDLE_CONNECTION_TIMEOUT);
  HttpClient httpClient = new HttpClient(connectionManager);
  
  stub._getServiceClient().getOptions().setProperty(HTTPConstants.CACHED_HTTP_CLIENT, httpClient);
  </code></pre>
  
  <p>My client seems to be working just fine. However, I would like to know how can I test if the connection pool is working in a correct way (i.e. the created connections are only destroyed after the time defined by the IDLE_CONNECTION_TIMEOUT constant). Any ideas?</p>