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 61FC0C4BB for ; Tue, 15 May 2012 20:16:29 +0000 (UTC) Received: (qmail 33375 invoked by uid 500); 15 May 2012 20:16:29 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 33351 invoked by uid 500); 15 May 2012 20:16:28 -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 33342 invoked by uid 99); 15 May 2012 20:16:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 May 2012 20:16:28 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 May 2012 20:16:23 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1SUOA5-0006Cc-Sm for users@camel.apache.org; Tue, 15 May 2012 13:16:01 -0700 Date: Tue, 15 May 2012 13:16:01 -0700 (PDT) From: Babak Vahdat To: users@camel.apache.org Message-ID: <1337112961884-5710373.post@n5.nabble.com> In-Reply-To: <1337111418619-5710346.post@n5.nabble.com> References: <1337110391827-5710327.post@n5.nabble.com> <1337110601782-5710330.post@n5.nabble.com> <1337111418619-5710346.post@n5.nabble.com> Subject: Re: Global Route Policy? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Using one of the Camel's own unit-tests [1] I did modify the test as the following to reproduce the behavior you've, however without success, as the test does pass: final SimpleScheduledRoutePolicy policy = new SimpleScheduledRoutePolicy(); long startTime = System.currentTimeMillis() + 3000L; long stopTime = System.currentTimeMillis() + 8000L; policy.setRouteStartDate(new Date(startTime)); policy.setRouteStartRepeatCount(1); policy.setRouteStartRepeatInterval(3000); policy.setRouteStopDate(new Date(stopTime)); policy.setRouteStopRepeatCount(1); policy.setRouteStopRepeatInterval(3000); context.getComponent("quartz", QuartzComponent.class).setPropertiesFile("org/apache/camel/routepolicy/quartz/myquartz.properties"); context.addRoutes(new RouteBuilder() { public void configure() { from("direct:start").noAutoStartup() .routeId("test") .routePolicy(policy) .to("mock:success"); } }); context.addRoutes(new RouteBuilder() { public void configure() { from("direct:start2").noAutoStartup() .routeId("test2") .routePolicy(policy) .to("mock:success2"); } }); context.start(); Thread.sleep(5000); assertTrue(context.getRouteStatus("test") == ServiceStatus.Started); assertTrue(context.getRouteStatus("test2") == ServiceStatus.Started); As you see using the same route polic both routes do start successfully, however it's not in Spring DSL as in your case but in Java, but this should not make any difference. Can you also double check [2] to see if that documentation could help you any further? [1] https://svn.apache.org/repos/asf/camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/SimpleScheduledCombinedRoutePolicyTest.java [2] http://fusesource.com/docs/router/2.5/eip/BasicPrinciples-ScheduledRoute-Simple.html Babak -- View this message in context: http://camel.465427.n5.nabble.com/Global-Route-Policy-tp5710327p5710373.html Sent from the Camel - Users mailing list archive at Nabble.com.