Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3AF92DED8 for ; Wed, 11 Jul 2012 14:26:06 +0000 (UTC) Received: (qmail 73339 invoked by uid 500); 11 Jul 2012 14:26:05 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 73272 invoked by uid 500); 11 Jul 2012 14:26:05 -0000 Mailing-List: contact commits-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 commits@cxf.apache.org Received: (qmail 73231 invoked by uid 99); 11 Jul 2012 14:26:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jul 2012 14:26:04 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jul 2012 14:26:01 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 7D27C238899C; Wed, 11 Jul 2012 14:25:41 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1360189 - in /cxf/trunk/rt/transports/http/src/main: java/org/apache/cxf/transport/http/HTTPConduit.java resources/schemas/wsdl/http-conf.xsd Date: Wed, 11 Jul 2012 14:25:41 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120711142541.7D27C238899C@eris.apache.org> Author: dkulp Date: Wed Jul 11 14:25:40 2012 New Revision: 1360189 URL: http://svn.apache.org/viewvc?rev=1360189&view=rev Log: [CXF-4417] Add settings to control the async behavior of the conduit Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java cxf/trunk/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xsd Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=1360189&r1=1360188&r2=1360189&view=diff ============================================================================== --- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java (original) +++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java Wed Jul 11 14:25:40 2012 @@ -1538,6 +1538,7 @@ public class HTTPConduit } } }; + HTTPClientPolicy policy = getClient(outMessage); try { Executor ex = outMessage.getExchange().get(Executor.class); if (ex == null) { @@ -1547,13 +1548,25 @@ public class HTTPConduit if (qu == null) { qu = mgr.getAutomaticWorkQueue(); } - qu.execute(runnable, 5000); + long timeout = 5000; + if (policy != null && policy.isSetAsyncExecuteTimeout()) { + timeout = policy.getAsyncExecuteTimeout(); + } + if (timeout > 0) { + qu.execute(runnable, timeout); + } else { + qu.execute(runnable); + } } else { outMessage.getExchange().put(Executor.class.getName() + ".USING_SPECIFIED", Boolean.TRUE); ex.execute(runnable); } } catch (RejectedExecutionException rex) { + if (policy != null && policy.isSetAsyncExecuteTimeoutRejection() + && policy.isAsyncExecuteTimeoutRejection()) { + throw rex; + } LOG.warning("EXECUTOR_FULL"); handleResponseInternal(); } Modified: cxf/trunk/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xsd URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xsd?rev=1360189&r1=1360188&r2=1360189&view=diff ============================================================================== --- cxf/trunk/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xsd (original) +++ cxf/trunk/rt/transports/http/src/main/resources/schemas/wsdl/http-conf.xsd Wed Jul 11 14:25:40 2012 @@ -183,6 +183,22 @@ + + + + Specifies the amount of time, in milliseconds, that a conduit will try and enqueue the response on the workqueue. + + + + + + + Specifies whether the conduit should throw and exception if it fails to enqueue the async response handling onto the workqueue. + By default, if the conduit fails to enqueue the response handling on the workqueue, it will process the response on the current thread. Set this to true to raise and exception instead. + + + +