cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <>
Subject Re: Async http requests and workqueue....
Date Sun, 09 Oct 2011 01:27:09 GMT
Hi Dan,

I think the first option is OK, and it can let the user know what's 
wrong immediately.
The other two option will be confused to the user if he just see the 
error and the call is succeed.
On Thu Oct  6 09:31:30 2011, Daniel Kulp wrote:
> I have a question for folks to see what folks would think is the "best
> option".    Basically, if you use one of the JAX-WS async methods on a client
> when talking to an HTTP service, we have to put a runnable on the workqueue to
> handle the response.   The question is, what should we do if the workqueue is
> full?  Could options:
> 1) (current behavior) Throw the RejectedExecutionException so the user knows
> they are exceeding defaults and likely should reconfigure things.
> 2) Loop in a Thread.yield and retry putting it on the queue until successfull.
> 3) Run the runnable synchronously on the calling thread.
> Likely 2 and 3 would both log a WARNING to let the user know to reconfigure.
> Obviously, the best solution would be to finish the work I did to use the
> apache http-client instead of the HttpURLConnection, but lets not go there
> right now.  :-)
> Anyway, thoughts?

Blog: (English) (Chinese)
Twitter: willemjiang 
Weibo: willemjiang 

View raw message