`
m635674608
  • 浏览: 5029491 次
  • 性别: Icon_minigender_1
  • 来自: 南京
社区版块
存档分类
最新评论

Invalid use of BasicClientConnManager: connection still allocated.

    博客分类:
  • java
 
阅读更多

BasicClientConnectionManager is a simple connection manager that maintains only one connection at a time. Even though this class is thread-safe it ought to be used by one execution thread only. BasicClientConnectionManager will make an effort to reuse the connection for subsequent requests with the same route. It will, however, close the existing connection and re-open it for the given route, if the route of the persistent connection does not match that of the connection request. If the connection has been already been allocated, then java.lang.IllegalStateException is thrown.

BasicClientConnectionManager is used by HttpClient per default.

See "Multithreaded request execution" on how to use a pooling connection manager that can handle requests across multiple threads.

 

 

http://stackoverflow.com/questions/14866362/invalid-use-of-basicclientconnmanager-connection-still-allocated

 

 

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics