hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Teja Sai Krishna <saravit...@yahoo.com>
Subject CLOSE_WAIT state at the HTTP Client side
Date Mon, 17 Oct 2005 10:57:17 GMT
Hi,

We have HTTP Client application that connects to the HttpListening Connector , which runs
on weblogic 8.1.

We are using apache's HTTPClient API to connect to the server.

Once the communication is over, some client side connections are in CLOSE_WAIT state. 

Some times i have seen these CLOSE_WAIT connections will disappear after one day. But most
of the times it will not disappear even after one day. I have to kill my application. 

Is CLOSE_WAIT at the client side means, my client is waiting  for final ack from the server?

Could you please suggest , how to resolve this issue?

My client code looks like this . I am releasing the connection after the communication happens.

--------------
HttpClient client = new HttpClient();

    // Create a method instance.
    GetMethod method = new GetMethod(url);
    
    // Provide custom retry handler is necessary
    method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, 
            new DefaultHttpMethodRetryHandler(3, false));
method.setRetryCount(0);

    try {
      // Execute the method.
      int statusCode = client.executeMethod(method);

           // Read the response body.
      byte[] responseBody = method.getResponseBody();

           System.out.println(new String(responseBody));

    } catch (HttpException e) {
     
      e.printStackTrace();
    } catch (IOException e) {
           e.printStackTrace();
    } finally {
      // Release the connection.
      method.releaseConnection();
    }  
  }
}-------------

Thanks
Regards
Teja

Send instant messages to your online friends http://uk.messenger.yahoo.com 
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message