我们在JBoss实例中使用HttpClient 3.1,但超时不起作用,由于某些原因,我们将超时设置为5秒(5000毫秒)。
HttpConnectionManagerParams cmparams = new HttpConnectionManagerParams();
cmparams.setSoTimeout(timeout);
cmparams.setConnectionTimeout(timeout);
cmparams.setTcpNoDelay(true);
HttpConnectionManager manager = new SimpleHttpConnectionManager();
manager.setParams(cmparams);
HttpClientParams params = new HttpClientParams();
params.setSoTimeout(timeout);
params.setConnectionManagerTimeout(timeout);
httpClient = new HttpClient(params, manager);
目前我们在10秒后获得套接字超时。现在有人为什么这不起作用?
由于