remove use of deprecated class

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1439691 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2013-01-28 23:25:18 +00:00
parent 8278565871
commit 71b7c89c8e
1 changed files with 9 additions and 8 deletions

View File

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