Michael Youngstrom wrote:

I've been experiencing some performance problems with Xfire
originating from I believe Http connection times.  I was doing some
research into support for persistent connections and it appears Http
commons supports this automatically.  The problem is you need to use
the same HttpClient instance for each client.executeMethod() call and
it appears CommonsHttpMessageSender is creating a new HttpClient each
time a message is sent, HttpChannel is creating a new
CommonsHttpMessageSender with every message, and it appears
SoapHttpTransport is creating a new Channel for each invocation.

Do you think it would be possible to either enhance
CommonsHttpMessageSender to reuse HttpClient instances or create an
alternative MessageSender that supports persistent connections?

I'd be happy to do it myself with a little direction.  My current
hiccup is I am unsure about the direction I should take with
SoapHttpTransport creating a new channel with each invocation, etc.. Is that necessary? Does anyone this it would be theoretically
possible to create a custom SoapHttpTransport that can reuse a channel
and hence reuse an HttpClient?

Mike
Yes, we definitely need to start reusing the HttpClients. I think its probably best to rework things a bit so we reuse the same Channel every time and cache things that way. We are caching the HttpState in ThreadLocal right now, but I think that method is pretty limited and we need to move to something else.

Is that enough to get you going? Regards,

- Dan

--
Dan Diephouse
(616) 971-2053
Envoi Solutions LLC
http://netzooid.com

Reply via email to