cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Pell <>
Subject throttling http-conduit connections
Date Mon, 28 May 2012 03:29:10 GMT

I have a requirement to be able to throttle my jaxws:client
connections to an external web service.  So lets say the service
provider requires me to limit the number of simultaneous connections
to their web site to be 10 connections.  I was thinking I could use a
counting semaphore with a constructor arg of 10 and then call acquire
before opening the connection to the external web service and
release() when i receive the response and close the connection.  The
external calls are synchronous.

However I am not sure where to start looking at this.  It would be
awesome if I could include this into the HttpConduit class.

The other thing to keep in mind is that I have the potential to have
multiple jaxws:client that refer to the same external url, and so I
want to be able throttle the total connections across both client

I guess what I would like to do is share a HttpConduit across both
clients (the url would be exactly the same for both of the clients)

The reason why I can have two clients pointing at the same url, is I
have xslt transformations in the interceptors so they expose different
interfaces but get mapped to the same one going out to the external

Could I provide my own HttpConduit implementation, or would this be
something that CXF would be interested in having contributed?

View raw message