> On Nov 8, 2016, at 12:43 PM, Canning, Charles <ccann...@stubhub.com> wrote:
> 
> Hi,
> 
> I am writing to figure out the model for the async methods for the JAX-RS 
> implementation. I went through the Jersey stuff and it actually consumes 2 
> threads per connection when in async and the lead states it is an 
> architectural flaw that they won’t fix. Could someone shed some details on 
> the design for CXF latest in this regard.

It kind of depends on the underlying HTTP conduit that CXF finds.  The default 
one based on the HTTPUrlConnection in the JDK will have a similar issue as it’s 
a blocking API.   We throw them on a configurable work queue so there are ways 
to limit the number of extra thread consumed, but it’s still not ideal.

If you install one of the Async based http conduits (we have on based on Apache 
HTTP components async client and another based on Netty), then it’s different.  
The underlying transport is non-blocking so we can have 100s of requests 
outstanding and the underlying transport library handles the NIO selector 
things and such so we aren’t consuming extra threads. 



-- 
Daniel Kulp
dk...@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to