List of usage examples for org.apache.commons.pool2.impl GenericObjectPool borrowObject
public T borrowObject(long borrowMaxWaitMillis) throws Exception
From source file:com.axibase.tsd.client.HttpClientManager.java
private HttpClient borrowClient() { GenericObjectPool<HttpClient> objectPool = createObjectPool(); HttpClient httpClient;/* w w w . ja va2s. com*/ try { httpClient = objectPool.borrowObject(borrowMaxWaitMillis); } catch (Exception e) { throw new AtsdClientException("Could not borrow http client from pool", e); } return httpClient; }