You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by pablo caballero <pd...@gmail.com> on 2011/01/05 04:29:53 UTC

HTTPConduit doubt

Looking at http://www.docjar.com/html/api/org/apache/cxf/transport/http/HTTPConduit.java.html
I can see that a HttpURLConnectionFactory is used to obtain the actual
connection.

My doubt is: the factory used in the default configuration (http, no
https) do use some kind of pool of efective connections (maybe of some
fixed/configurable size) or a connection is established every time
that a reqeust is maded?

Thanks in advance.

Re: HTTPConduit doubt

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

The default behavior for client is keeping its connection open after  
the initial request/response sequence. If the server honors it, the  
connection is kept open until the consumer closes it.

More details is from[1]

[1]http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html

Freeman
On 2011-1-5, at 上午11:29, pablo caballero wrote:

> Looking at http://www.docjar.com/html/api/org/apache/cxf/transport/http/HTTPConduit.java.html
> I can see that a HttpURLConnectionFactory is used to obtain the actual
> connection.
>
> My doubt is: the factory used in the default configuration (http, no
> https) do use some kind of pool of efective connections (maybe of some
> fixed/configurable size) or a connection is established every time
> that a reqeust is maded?
>
> Thanks in advance.


-- 
Freeman Fang

------------------------

FuseSource: http://fusesource.com
blog: http://freemanfang.blogspot.com
twitter: http://twitter.com/freemanfang
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org


Re: HTTPConduit doubt

Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday 04 January 2011 10:29:53 pm pablo caballero wrote:
> Looking at
> http://www.docjar.com/html/api/org/apache/cxf/transport/http/HTTPConduit.j
> ava.html I can see that a HttpURLConnectionFactory is used to obtain the
> actual connection.
> 
> My doubt is: the factory used in the default configuration (http, no
> https) do use some kind of pool of efective connections (maybe of some
> fixed/configurable size) or a connection is established every time
> that a reqeust is maded?

CXF just uses the HttpURLConnection in the JDK which DOES maintain a pool of 
connections.     It isn't very configurable from a client side, but the Server 
can send back properties in the Keep-Alive header to control the number of 
connections help open to the server and the idle time.   It's more server 
controlled than client controlled. 


-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog