Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-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 6809FD15E for ; Fri, 17 Aug 2012 04:21:30 +0000 (UTC) Received: (qmail 66599 invoked by uid 500); 17 Aug 2012 04:21:29 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 66441 invoked by uid 500); 17 Aug 2012 04:21:25 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 66416 invoked by uid 99); 17 Aug 2012 04:21:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Aug 2012 04:21:24 +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; Fri, 17 Aug 2012 04:21:23 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id B03252388900; Fri, 17 Aug 2012 04:20:40 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1374133 - /camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java Date: Fri, 17 Aug 2012 04:20:40 -0000 To: commits@camel.apache.org From: ningjiang@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120817042040.B03252388900@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ningjiang Date: Fri Aug 17 04:20:40 2012 New Revision: 1374133 URL: http://svn.apache.org/viewvc?rev=1374133&view=rev Log: CAMEL-5515 Fixed the issue of thread Java DSL Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java?rev=1374133&r1=1374132&r2=1374133&view=diff ============================================================================== --- camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java (original) +++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java Fri Aug 17 04:20:40 2012 @@ -1132,6 +1132,7 @@ public abstract class ProcessorDefinitio public ThreadsDefinition threads(int poolSize) { ThreadsDefinition answer = threads(); answer.setPoolSize(poolSize); + addOutput(answer); return answer; } @@ -1146,6 +1147,24 @@ public abstract class ProcessorDefinitio ThreadsDefinition answer = threads(); answer.setPoolSize(poolSize); answer.setMaxPoolSize(maxPoolSize); + addOutput(answer); + return answer; + } + + /** + * Continues processing the {@link org.apache.camel.Exchange} using asynchronous routing engine. + * + * @param poolSize the core pool size + * @param maxPoolSize the maximum pool size + * @param threadName the thread pool name + * @return the builder + */ + public ThreadsDefinition threads(int poolSize, int maxPoolSize, String threadName) { + ThreadsDefinition answer = threads(); + answer.setPoolSize(poolSize); + answer.setMaxPoolSize(maxPoolSize); + answer.setThreadName(threadName); + addOutput(answer); return answer; }