I think you are right. After I released the connection, I still see a connection
in the netstat overview.
Thank you
Markus
------------------------------------------------
de.ibm.com
Von: Roland Weber An:
<[EMAIL PROTECTED]> "HttpClient User Discussion"
<[email protected]>
Vom: 26.07.2007 08:25
Bitte antworten an
"HttpClient User
Discussion"
Thema: Re: WG: Connection timeout using httpclient [*]
[EMAIL PROTECTED] wrote on 26.07.2007 08:16:42:
> After sent a sms I close the connection via method.releaseConnection().
If I
> don't send a sms for more than 2 hours and then the next sms I get
aconnection
> timeout. But after that, the 2 second sms works again. Does
releaseConnection
> really close the connection ?
No, it doesn't. releaseConnection releases the connection back to
the connection pool, where it is kept open for re-use. You can
either disable connection re-use altogether, for example by sending
"Connection: close" headers with the requests, or you can call the
method closeIdleConnections(...) on the connection pool to close
only the connections that have been open and idle for a given
timespan. It depends on the requency of your requests whether
connection keep-alive is a performance improvement or not.
http://jakarta.apache.org/commons/httpclient/performance.html#Connection_persistence
http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/HttpConnectionManager.html#closeIdleConnections(long)
cheers,
Roland
----------------------------------------------------------------------------------------------------------------------------------------------
FIDUCIA IT AG
Fiduciastraße 20
76227 Karlsruhe
Sitz der Gesellschaft: Karlsruhe
AG Mannheim HRB 100059
Vorsitzender des Aufsichtsrats: Erwin Kuhn
Vorsitzender des Vorstands: Michael Krings
Vorstand: Klaus-Peter Bruns, Hans-Peter Straberger, Eckhardt Werner
Umsatzsteuer-ID.Nr. DE143582320, http://www.fiducia.de
----------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]