Just logged: https://issues.apache.org/jira/browse/CXF-5695
for this. Fairly easy fix which I’m testing now. Should be committed shortly. Dan On Apr 15, 2014, at 3:02 PM, Mandy Warren <mandys.in...@gmail.com> wrote: > > Hi, > > I've knocked up a unit test to prove my settings for > org.apache.cxf.transport.http.async.MAX_PER_HOST_CONNECTIONS and > org.apache.cxf.transport.http.async.MAX_CONNECTIONS are getting set > correctly but not having much luck! > > Here's the test:- > > @Test > public void getClientUsingApacheCommonsAsync() throws Exception { > BusFactory.getDefaultBus().setProperty > ("use.async.http.conduit", true); > BusFactory.getDefaultBus().setProperty > ("org.apache.cxf.transport.http.async.MAX_PER_HOST_CONNECTIONS", 10000); > BusFactory.getDefaultBus().setProperty > ("org.apache.cxf.transport.http.async.MAX_CONNECTIONS", 10000); > > WebClient.create(adfmsDummyServer.getBaseURL(), > Lists.newArrayList(new JacksonJsonProvider()), > true).path("/delay").accept("application/json").get(); > // TODO - add some asserts, no idea what yet! > } > > I've grep'd the cxf source code and the only place I can see a ref to > either of the MAX_XXX properties is in AsyncHTTPConduitFactory. An instance > of this class is constructed when the bus is created and then the method > setProperties() is called passing in the bus properties to then set on the > connection:- > > public AsyncHTTPConduitFactory(Bus b) { > this(); > addListener(b); > config.setTcpNoDelay(true); > setProperties(b.getProperties()); > } > > BUT, when the bus is constructed and hence the AsyncHTTPConduitFactory > constructor is called, the bus has no properties hence the default values > of 5000 and 1000 are used. The setProperties() method is never called again > so I just can't work out how my actual properties get set on the > connection! > > Any help much appreciated :-) > > Many thanks > Mandy > > Sent from a mobile device -- Daniel Kulp dk...@apache.org - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com