too many TCP connections using httpClient?

2004-10-21 Thread Massimo Signori
Hi everybody, this is my code: private void notifyTimeServer() { // logger.debug(notifyTimeServer, + timerURL); // HttpClient client = new HttpClient(); HttpMethod method = new GetMethod(timerURL); int statusCode = -1; for (int attempt =

Re: too many TCP connections using httpClient?

2004-10-21 Thread Ortwin Glück
Make sure to *always* call method.releaseConnection() e.g. a finally block. Even if the request was unsuccessful. Massimo Signori wrote: Hi everybody, this is my code: private void notifyTimeServer() { // logger.debug(notifyTimeServer, + timerURL); //

Re: too many TCP connections using httpClient?

2004-10-21 Thread Oleg Kalnichevski
Massimo, Calling HttpMethod#releaseConnection() does not guarantee that the active connection will be closed. HttpClient _always_ tries its best to reuse open connections. Whenever a connection can be kept alive, HttpClient will keep it alive. That effectively means that when an HttpClient

RE: Is it possible to send and email using HTTPCLIENT?

2004-10-21 Thread Steve Johnson
How about FTP through an HTTP proxy? Thanks, Steve Steve Johnson, Software Engineer, [EMAIL PROTECTED] direct 720.564.6532 www.mercury.com www.mercury.com -Original Message- From: Gerdes, Tom [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 20, 2004 8:08 AM To: Commons