if (iceFactory == null) {
iceFactory = ctx.getCache().getAdvancedCache().getComponentRegistry().getComponent(InternalEntryFactory.class);
}
connectionManager = new PoolingClientConnectionManager();
ConnectionPoolConfiguration pool = configuration.connectionPool();
connectionManager.setDefaultMaxPerRoute(pool.maxConnectionsPerHost());
connectionManager.setMaxTotal(pool.maxTotalConnections());
HttpParams params = new BasicHttpParams();
params.setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, pool.connectionTimeout());
params.setParameter(CoreConnectionPNames.SO_TIMEOUT, pool.socketTimeout());
params.setParameter(CoreConnectionPNames.TCP_NODELAY, pool.tcpNoDelay());
params.setParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, pool.bufferSize());
httpClient = new DefaultHttpClient(connectionManager, params);
httpHost = new HttpHost(configuration.host(), configuration.port());