On Fri May 22 2009 6:53:22 pm Steve Venditti wrote:
> Hello -
>
> I've been performance tuning a client application that has some unique
> characteristics. To oversimplify, it consists of a data channel and a
> command channel. The data channel uses raw HTTP and I can use the
> pooling features of the Apache HttpClient API to minimize connection
> churn. The SOAP services run ontop of CXF and it seems like they are
> always closed after a successful method call even if keep-alive is
> specified. 

In general, the Java HTTPUrlConnection thing closes them 5 seconds after the 
call if keep-alive is turned on.   If you want something longer than that, you 
need to configure the server to add parameters to the Keep-Alive header such 
as:

timeout=60, max=5;

or similar.   Basically, the Java connection is a bit nicer to the servers as 
the servers specify how long and how many connections to keep open.   (the 
default for java urlconnection is timeout=5, max=5)



> Based on my scoping of the Java source code, the
> HttpConduit class in CXF is implemented ontop of HttpURLConnection and
> it appears to close connections after each request. It seems like the
> HttpClient API provides some sort of  URLConnection adapter but it
> doesn't seem complete...
>
> So...I've been looking for a means to provide my own HttpConduit
> implementation based off on an Apache HttpClient connection pool.
>
> Does something exist in the source code for CXF or is there a well
> known way to provide a custom HttpConduit that is based off of an
> Apache HttpClient connection pool at this point?

Not at this point, no.   There was some talk about creating a Apache 
HttpClient implementation at one point, but it never really progressed 
anywhere.  Patches or similar would be welcome, as long as it DOESN'T change 
the default of using the stuff built into the JDK or make the http-client 
stuff a required jar.

Dan


>
> Thanks - any links, tips, suggestions would be appreciated.
>
>
> - Steve

-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to