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 2ED2B7B7E for ; Sun, 9 Oct 2011 01:27:43 +0000 (UTC) Received: (qmail 27054 invoked by uid 500); 9 Oct 2011 01:27:42 -0000 Delivered-To: apmail-cxf-dev-archive@cxf.apache.org Received: (qmail 26996 invoked by uid 500); 9 Oct 2011 01:27:42 -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 26988 invoked by uid 99); 9 Oct 2011 01:27:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Oct 2011 01:27:42 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of willem.jiang@gmail.com designates 209.85.210.169 as permitted sender) Received: from [209.85.210.169] (HELO mail-iy0-f169.google.com) (209.85.210.169) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Oct 2011 01:27:35 +0000 Received: by iaen33 with SMTP id n33so7749782iae.0 for ; Sat, 08 Oct 2011 18:27:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=KU1b9RAhfn+RdXR/P5cDSVhMkimuQOEH9VSVgRUL3cU=; b=YqMr9K82mhBz7Xv7AUhQsLxeD/rZj0ywu97LMGM3itO67u6JW4+qtIQ+0xXgWaqU3w CemGZwUoIs4f7mUHdOMo+PliVWYeM+N69yKG3Kb9ynvUUY4pJsnp2idu92T+RSc+Qrx8 p2xFgG2zbUKvDcrVspkm0gkbf9YGk/BUFL/1c= Received: by 10.231.70.131 with SMTP id d3mr5786217ibj.90.1318123634887; Sat, 08 Oct 2011 18:27:14 -0700 (PDT) Received: from [192.168.0.158] ([125.34.7.36]) by mx.google.com with ESMTPS id z11sm33353985iba.6.2011.10.08.18.27.12 (version=SSLv3 cipher=OTHER); Sat, 08 Oct 2011 18:27:13 -0700 (PDT) Message-ID: <4E90F86D.5030302@gmail.com> Date: Sun, 09 Oct 2011 09:27:09 +0800 From: Willem Jiang User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: dev@cxf.apache.org Subject: Re: Async http requests and workqueue.... References: <23550744.lmGD4TzWaC@dilbert.dankulp.com> In-Reply-To: <23550744.lmGD4TzWaC@dilbert.dankulp.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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? > > -- Willem ---------------------------------- FuseSource Web: http://www.fusesource.com Blog: http://willemjiang.blogspot.com (English) http://jnn.javaeye.com (Chinese) Twitter: willemjiang Weibo: willemjiang