Return-Path: Delivered-To: apmail-sling-commits-archive@www.apache.org Received: (qmail 60488 invoked from network); 17 Dec 2009 12:51:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Dec 2009 12:51:26 -0000 Received: (qmail 28848 invoked by uid 500); 17 Dec 2009 12:51:26 -0000 Delivered-To: apmail-sling-commits-archive@sling.apache.org Received: (qmail 28797 invoked by uid 500); 17 Dec 2009 12:51:26 -0000 Mailing-List: contact commits-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sling.apache.org Delivered-To: mailing list commits@sling.apache.org Received: (qmail 28777 invoked by uid 99); 17 Dec 2009 12:51:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Dec 2009 12:51:26 +0000 X-ASF-Spam-Status: No, hits=-4.1 required=5.0 tests=AWL,BAYES_00 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; Thu, 17 Dec 2009 12:51:24 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 804222388A04; Thu, 17 Dec 2009 12:51:04 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r891680 - in /sling/trunk/bundles/commons/scheduler: pom.xml src/main/java/org/apache/sling/commons/scheduler/impl/QuartzScheduler.java Date: Thu, 17 Dec 2009 12:51:03 -0000 To: commits@sling.apache.org From: cziegeler@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091217125104.804222388A04@eris.apache.org> Author: cziegeler Date: Thu Dec 17 12:50:57 2009 New Revision: 891680 URL: http://svn.apache.org/viewvc?rev=891680&view=rev Log: SLING-1248 : Use new commons threads Modified: sling/trunk/bundles/commons/scheduler/pom.xml sling/trunk/bundles/commons/scheduler/src/main/java/org/apache/sling/commons/scheduler/impl/QuartzScheduler.java Modified: sling/trunk/bundles/commons/scheduler/pom.xml URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/scheduler/pom.xml?rev=891680&r1=891679&r2=891680&view=diff ============================================================================== --- sling/trunk/bundles/commons/scheduler/pom.xml (original) +++ sling/trunk/bundles/commons/scheduler/pom.xml Thu Dec 17 12:50:57 2009 @@ -29,7 +29,7 @@ org.apache.sling.commons.scheduler bundle - 2.1.1-SNAPSHOT + 2.2.0-SNAPSHOT Apache Sling Scheduler Support @@ -55,10 +55,10 @@ - org.apache.commons.collections,* + org.apache.commons.collections,* - org.apache.sling.commons.scheduler;version=${pom.version} + org.apache.sling.commons.scheduler;version=2.1.0 org.apache.sling.commons.scheduler.impl, @@ -111,7 +111,8 @@ org.apache.sling org.apache.sling.commons.threads - 2.0.2-incubator + 3.0.0-SNAPSHOT + provided Modified: sling/trunk/bundles/commons/scheduler/src/main/java/org/apache/sling/commons/scheduler/impl/QuartzScheduler.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/scheduler/src/main/java/org/apache/sling/commons/scheduler/impl/QuartzScheduler.java?rev=891680&r1=891679&r2=891680&view=diff ============================================================================== --- sling/trunk/bundles/commons/scheduler/src/main/java/org/apache/sling/commons/scheduler/impl/QuartzScheduler.java (original) +++ sling/trunk/bundles/commons/scheduler/src/main/java/org/apache/sling/commons/scheduler/impl/QuartzScheduler.java Thu Dec 17 12:50:57 2009 @@ -61,8 +61,6 @@ protected static final String DEFAULT_QUARTZ_JOB_GROUP = "Sling"; - protected static final String THREAD_POOL_NAME = "SLING_SCHEDULER"; - protected static final String PREFIX = "Apache Sling Quartz Scheduler "; protected static final String QUARTZ_SCHEDULER_NAME = "ApacheSling"; @@ -94,6 +92,8 @@ /** @scr.reference */ protected ThreadPoolManager threadPoolManager; + protected ThreadPool threadPool; + /** * Activate this component. * Start the scheduler. @@ -147,8 +147,8 @@ s = factory.getScheduler(); } else { // create the pool - final ThreadPool pool = tpm.get(THREAD_POOL_NAME); - final QuartzThreadPool quartzPool = new QuartzThreadPool(pool); + this.threadPool = tpm.get(null); + final QuartzThreadPool quartzPool = new QuartzThreadPool(this.threadPool); final DirectSchedulerFactory factory = DirectSchedulerFactory.getInstance(); // unique run id @@ -181,6 +181,11 @@ * @param s The scheduler. */ protected void dispose(final org.quartz.Scheduler s) { + final ThreadPoolManager tpm = this.threadPoolManager; + if ( tpm != null && this.threadPool != null ) { + tpm.release(this.threadPool); + this.threadPool = null; + } if ( s != null ) { try { s.shutdown();