If async in a client is a "loop" then only 2 really makes sense, that forces all the error handling on the client though. #3 is a possible thing a #2 could do?
Number 1 is just an "INONLY" and thx, k bai type solution? On Wed, Oct 5, 2011 at 7:31 PM, Daniel Kulp <[email protected]> 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? > > > -- > Daniel Kulp > [email protected] > http://dankulp.com/blog > Talend - http://www.talend.com >
