I am using Apache http client 3 in the multithreaded environment and sending http post request as xml based to other party server.
I can able to simulate in my local system
- java.net.ConnectException => when server is down
- java.net.SocketTimeoutException => when server accepted my connection and not able to send response back to my application within some time which we configured.
but in the real-time running environment , i have received the new exception like org.apache.commons.httpclient.ConnectTimeoutException
Questions:
what is the difference b/w java.net.ConnectException vs org.apache.commons.httpclient.ConnectTimeoutException
how to simulate org.apache.commons.httpclient.ConnectTimeoutException in local system
any inputs will use full.