Return-Path: Delivered-To: apmail-geronimo-activemq-commits-archive@www.apache.org Received: (qmail 77166 invoked from network); 30 Dec 2005 21:27:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 Dec 2005 21:27:44 -0000 Received: (qmail 13081 invoked by uid 500); 30 Dec 2005 21:27:44 -0000 Delivered-To: apmail-geronimo-activemq-commits-archive@geronimo.apache.org Received: (qmail 13069 invoked by uid 500); 30 Dec 2005 21:27:44 -0000 Mailing-List: contact activemq-commits-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-dev@geronimo.apache.org Delivered-To: mailing list activemq-commits@geronimo.apache.org Received: (qmail 13060 invoked by uid 99); 30 Dec 2005 21:27:44 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Dec 2005 13:27:44 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 30 Dec 2005 13:27:43 -0800 Received: (qmail 77091 invoked by uid 65534); 30 Dec 2005 21:27:23 -0000 Message-ID: <20051230212723.77090.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r360169 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/DefaultThreadPools.java Date: Fri, 30 Dec 2005 21:27:23 -0000 To: activemq-commits@geronimo.apache.org From: chirino@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: chirino Date: Fri Dec 30 13:27:21 2005 New Revision: 360169 URL: http://svn.apache.org/viewcvs?rev=360169&view=rev Log: Make the default thread pool create deamon threads Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/DefaultThreadPools.java Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/DefaultThreadPools.java URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/DefaultThreadPools.java?rev=360169&r1=360168&r2=360169&view=diff ============================================================================== --- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/DefaultThreadPools.java (original) +++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/thread/DefaultThreadPools.java Fri Dec 30 13:27:21 2005 @@ -18,6 +18,7 @@ import edu.emory.mathcs.backport.java.util.concurrent.Executor; import edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor; +import edu.emory.mathcs.backport.java.util.concurrent.ThreadFactory; /** * @@ -25,7 +26,17 @@ */ public class DefaultThreadPools { - private static final Executor defaultPool = new ScheduledThreadPoolExecutor(5); + private static final Executor defaultPool; + static { + defaultPool = new ScheduledThreadPoolExecutor(5, new ThreadFactory() { + public Thread newThread(Runnable runnable) { + Thread thread = new Thread(runnable, "ActiveMQ Default Thread Pool Thread"); + thread.setDaemon(true); + return thread; + } + }); + } + private static final TaskRunnerFactory defaultTaskRunnerFactory = new TaskRunnerFactory(defaultPool,10); public static Executor getDeaultPool() {