import org.apache.archiva.configuration.UserInterfaceOptions;
import org.apache.archiva.configuration.WebappConfiguration;
import org.apache.commons.lang.StringUtils;
+import org.apache.http.impl.conn.PoolingClientConnectionManager;
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
import org.apache.maven.wagon.providers.http.HttpWagon;
import org.springframework.stereotype.Service;
{
// back to default values
HttpWagon.setUseClientManagerPooled( true );
- ThreadSafeClientConnManager threadSafeClientConnManager = new ThreadSafeClientConnManager();
- threadSafeClientConnManager.setDefaultMaxPerRoute( 30 );
- threadSafeClientConnManager.setMaxTotal( 30 );
- HttpWagon.setConnectionManagerPooled( threadSafeClientConnManager );
+ PoolingClientConnectionManager poolingClientConnectionManager = new PoolingClientConnectionManager();
+ poolingClientConnectionManager.setDefaultMaxPerRoute( 30 );
+ poolingClientConnectionManager.setMaxTotal( 30 );
+ HttpWagon.setConnectionManagerPooled( poolingClientConnectionManager );
}
else
{
HttpWagon.setUseClientManagerPooled( networkConfiguration.isUsePooling() );
- ThreadSafeClientConnManager threadSafeClientConnManager = new ThreadSafeClientConnManager();
- threadSafeClientConnManager.setDefaultMaxPerRoute( networkConfiguration.getMaxTotalPerHost() );
- threadSafeClientConnManager.setMaxTotal( networkConfiguration.getMaxTotal() );
- HttpWagon.setConnectionManagerPooled( threadSafeClientConnManager );
+ PoolingClientConnectionManager poolingClientConnectionManager = new PoolingClientConnectionManager();
+ poolingClientConnectionManager.setDefaultMaxPerRoute( networkConfiguration.getMaxTotalPerHost() );
+ poolingClientConnectionManager.setMaxTotal( networkConfiguration.getMaxTotal() );
+ HttpWagon.setConnectionManagerPooled( poolingClientConnectionManager );
}
}