Hello,
I get this warning when I have a HTTP Timeout
SimpleHttpConnectionManager being used incorrectly. Be sure that
HttpMethod.releaseConnection() is always called and that only one
thread and/or method is using this connection manager at a time.
Is it normal? Am I doing something incorrectly or is it a bug?
Here is the code:
-------------------------------------------------------------------------------------------------------
HttpClient client = new HttpClient();
PostMethod method = new PostMethod(strMyInterface);
// setting Timeout
client.getParams().setParameter("http.socket.timeout", 10000);
try {
// Execute the method.
int statusCode = client.executeMethod(method);
// Read the response body.
byte[] responseBody = method.getResponseBody();
} catch (HttpException e) {
System.err.println("Fatal protocol violation: " + e.getMessage());
e.printStackTrace();
} catch (IOException e) {
System.err.println("Fatal transport error: " + e.getMessage());
e.printStackTrace();
} finally {
// Release the connection.
method.releaseConnection();
}
---------------------------------------------------------------------------------------------------------------------------------
Thanks in advance.
Pere
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]