Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8B5B490D1 for ; Sat, 4 Feb 2012 17:51:06 +0000 (UTC) Received: (qmail 39017 invoked by uid 500); 4 Feb 2012 17:51:06 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 38915 invoked by uid 500); 4 Feb 2012 17:51:05 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 38907 invoked by uid 99); 4 Feb 2012 17:51:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 17:51:05 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of larry.meadors@gmail.com designates 209.85.212.45 as permitted sender) Received: from [209.85.212.45] (HELO mail-vw0-f45.google.com) (209.85.212.45) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 17:50:58 +0000 Received: by vbal1 with SMTP id l1so3775198vba.32 for ; Sat, 04 Feb 2012 09:50:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=Zh9iMjedhOD+V76Gei1wDl274W8Wp+ffOICjZ+RgPK8=; b=GOuiNoRW8XYdXy8A0IlQ6SEkCT9eEbUIMHm+AY0L3+iZSBeZVJxOqnqk9TH3maLF2Y ru01uGy3OYczNx/Da1djHVvb5+ZSeblsA2Jw+LRsAL9vAbtDs/o6qxOGtYIrY+W/phyr rySY1gAL0x0/yqwKp6f0VRiB8AVrEZKyvT26o= Received: by 10.52.173.211 with SMTP id bm19mr5443256vdc.2.1328377838136; Sat, 04 Feb 2012 09:50:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.52.35.1 with HTTP; Sat, 4 Feb 2012 09:50:18 -0800 (PST) Reply-To: larry.meadors@gmail.com In-Reply-To: <1328375359585-5456440.post@n5.nabble.com> References: <1328312823136-5455435.post@n5.nabble.com> <4F2C75FD.8090206@gmail.com> <1328356586699-5456068.post@n5.nabble.com> <1328363375728-5456174.post@n5.nabble.com> <1328375359585-5456440.post@n5.nabble.com> From: Larry Meadors Date: Sat, 4 Feb 2012 10:50:18 -0700 Message-ID: Subject: Re: File consumer - waiting for it to start To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 Same result - works with the sleep; fails without it...which seems odd - I wonder if it's a result of using the onCompletion() stuff to shut things down. I added some logging to see what's happening. Without the sleep call it looks like this: [thread #0] INFO 2012-02-04 10:43:16,646: shutting down route DirectCopyRoute and main (my message) [main] INFO 2012-02-04 10:43:16,646: Asserting: Endpoint[mock://test] is satisfied [main] INFO 2012-02-04 10:43:16,647: checking to see if stop was called (my message) [thread #0] INFO 2012-02-04 10:43:16,647: Starting to graceful shutdown 1 routes (timeout 10 seconds) [thread #1] INFO 2012-02-04 10:43:16,650: Route: DirectCopyRoute shutdown complete, was consuming from: Endpoint[direct://test] [thread #0] INFO 2012-02-04 10:43:16,650: Graceful shutdown of 1 routes completed in 0 seconds [thread #0] INFO 2012-02-04 10:43:16,651: Route: DirectCopyRoute stopped, was consuming from: Endpoint[direct://test] [thread #0] INFO 2012-02-04 10:43:16,657: everything is shut down now (my message) With the sleep, it looks like this: [thread #0] INFO 2012-02-04 10:45:49,111: shutting down route DirectCopyRoute and main (my message) [main] INFO 2012-02-04 10:45:49,111: Asserting: Endpoint[mock://test] is satisfied [thread #0] INFO 2012-02-04 10:45:49,112: Starting to graceful shutdown 1 routes (timeout 10 seconds) [thread #1] INFO 2012-02-04 10:45:49,114: Route: DirectCopyRoute shutdown complete, was consuming from: Endpoint[direct://test] [thread #0] INFO 2012-02-04 10:45:49,115: Graceful shutdown of 1 routes completed in 0 seconds [thread #0] INFO 2012-02-04 10:45:49,116: Route: DirectCopyRoute stopped, was consuming from: Endpoint[direct://test] [thread #0] INFO 2012-02-04 10:45:49,122: everything is shut down now (my message) [main] INFO 2012-02-04 10:45:49,212: checking to see if stop was called (my message) I can live with the sleep in the test - it's only 100ms. :) Larry