Return-Path: X-Original-To: apmail-cxf-dev-archive@www.apache.org Delivered-To: apmail-cxf-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B69159972 for ; Tue, 11 Oct 2011 02:57:15 +0000 (UTC) Received: (qmail 16824 invoked by uid 500); 11 Oct 2011 02:57:15 -0000 Delivered-To: apmail-cxf-dev-archive@cxf.apache.org Received: (qmail 16779 invoked by uid 500); 11 Oct 2011 02:57:12 -0000 Mailing-List: contact dev-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list dev@cxf.apache.org Received: (qmail 16771 invoked by uid 99); 11 Oct 2011 02:57:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Oct 2011 02:57:11 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [64.85.173.253] (HELO server.dankulp.com) (64.85.173.253) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Oct 2011 02:57:05 +0000 Received: by server.dankulp.com (Postfix, from userid 5000) id DEF2618409F; Mon, 10 Oct 2011 22:56:44 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on server.dankulp.com X-Spam-Level: X-Msg-File: /tmp/mailfilter-dev@cxf.apache.org.AU4C8xRv92 Received: from dilbert.dankulp.com (c-24-91-72-253.hsd1.ma.comcast.net [24.91.72.253]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server.dankulp.com (Postfix) with ESMTPSA id CB32818409F; Mon, 10 Oct 2011 22:56:43 -0400 (EDT) From: Daniel Kulp To: dev@cxf.apache.org Cc: Willem Jiang Subject: Re: Async http requests and workqueue.... Date: Mon, 10 Oct 2011 22:56:42 -0400 Message-ID: <10989094.3uIXRRaWIW@dilbert.dankulp.com> User-Agent: KMail/4.7.2 (Linux/3.0.1; KDE/4.7.2; x86_64; ; ) In-Reply-To: <4E90F86D.5030302@gmail.com> References: <23550744.lmGD4TzWaC@dilbert.dankulp.com> <4E90F86D.5030302@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Old-Spam-Status: No, score=-102.9 required=3.0 tests=ALL_TRUSTED,BAYES_00, SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.3.1 On Sunday, October 09, 2011 9:27:09 AM Willem Jiang wrote: > 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. After thinking about this some more, option 1 is REALLY a bad option. The problem is that the request has been sent. Thus, the server is processing it and doing whatever it's supposed to do. However, the client has no indication about the status of that request, any way to get a response, fault, etc.... I put #3 in place, but that has other issues with Camel, but none as bad a option #1. I'm still playing with various options. Dan > > 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? -- Daniel Kulp dkulp@apache.org http://dankulp.com/blog Talend - http://www.talend.com