HttpConnectionManagerParams params = new HttpConnectionManagerParams();
params.setSoTimeout(executor.getConnectionTimeout());
params.setConnectionTimeout(executor.getConnectionTimeout());
// TODO: make the http client a well behaved http client, no more than x connections
// per server (x admin configurable maybe), persistent connections and so on
HttpConnectionManager manager = new SimpleHttpConnectionManager();
manager.setParams(params);
client.setHttpConnectionManager(manager);
// prepare either a GET or a POST request
if (ref.getMethod() == null || ref.getMethod() == MethodType.GET_LITERAL) {
GetMethod get = new GetMethod(ref.getHref());