Oh that's embarrassing - my start() had been inadvertently commented out.    
Thanks!


-----Original Message-----
From: Oleg Kalnichevski [mailto:[email protected]] 
Sent: Tuesday, June 18, 2013 9:37 AM
To: HttpClient User Discussion
Subject: Re: Async beta4 Connection Pooling

On Tue, 2013-06-18 at 14:13 +0000, Matt Brown wrote:
> Taking a look at async client 4.0-beta4 and looking for a little guidance.
> 
> 
> With beta3 we had some code like:
> 
> PoolingClientAsyncConnectionManager asyncMgr = new 
> PoolingClientAsyncConnectionManager(new DefaultConnectingIOReactor());
>                 asyncMgr.setMaxTotal(maxConnections);
>                 asyncMgr.setDefaultMaxPerRoute(maxConnections);
>                 asyncMgr.setMaxPerRoute(hapiServer, maxConnections);
> 
> httpAsyncClient = new DefaultHttpAsyncClient(asyncMgr);
> 
> 
> With beta4 I was trying something like:
> 
>                 PoolingNHttpClientConnectionManager asyncMgr = new 
> PoolingNHttpClientConnectionManager(new DefaultConnectingIOReactor()); 
> asyncMgr.setMaxTotal(maxConnections);
>                 asyncMgr.setDefaultMaxPerRoute(maxConnections);
>                 asyncMgr.setMaxPerRoute(hapiServer, maxConnections);
> 
>                 httpAsyncClient = 
> HttpAsyncClients.createMinimal(asyncMgr);
> 
> 
> I'm running into "Request cannot be executed; I/O reactor status: INACTIVE".
> 
> So clearly I'm not doing the new pooling connection manager correctly.   Is 
> there documentation/examples I'm missing?
> 
> Matt

Matt,

I think you simply need to start the client

---
CloseableHttpAsyncClient httpclient = HttpAsyncClients.createMinimal(); 
httpclient.start();
---

There are some examples that should help you get started

http://hc.apache.org/httpcomponents-asyncclient-dev/examples.html

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to