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 7DB7BF3EF for ; Fri, 22 Mar 2013 06:56:25 +0000 (UTC) Received: (qmail 76421 invoked by uid 500); 22 Mar 2013 06:56:25 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 76136 invoked by uid 500); 22 Mar 2013 06:56:24 -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 76108 invoked by uid 99); 22 Mar 2013 06:56:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Mar 2013 06:56:23 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of claus.ibsen@gmail.com designates 209.85.210.181 as permitted sender) Received: from [209.85.210.181] (HELO mail-ia0-f181.google.com) (209.85.210.181) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Mar 2013 06:56:18 +0000 Received: by mail-ia0-f181.google.com with SMTP id o25so3218003iad.26 for ; Thu, 21 Mar 2013 23:55:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=DuYxf48lufcU/Zs/CvPRQhSCNaW/ilRCZ6aK3ZHwFYc=; b=F9xRvQCY/BRi2NXodFOSL2c1HubMf7TduUubaGzomgKSTzitpgcroQs64NsmiVmGzY rWmZc1cNdHijc4zYbhtCUfEW8j48DsKVDRuEUwBsNx7QD4V9aoTM16SV8tahBIwWZa9C S02v0Zg8FOomkI1ZEQpMVvB6s2xHRh21IReou85oQGYoPALgtubsAoo+vWjfofcE+Y0q Z0iVWm64AdOoJhVEwaa5v9ftBW3jpHh5GFxsWv/5chj/brrV+JiwxDO1Puu9uqiFWdmH eNmMWJ6WMqcA6Z6JvFa+QESF1zhqh1wBpfCN/azj3AXZlLUlzA8Vh8sz6VfHbAxKFsIT 42xg== X-Received: by 10.50.45.230 with SMTP id q6mr449471igm.39.1363935357973; Thu, 21 Mar 2013 23:55:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.53.232 with HTTP; Thu, 21 Mar 2013 23:55:37 -0700 (PDT) In-Reply-To: <1363872029259-5729614.post@n5.nabble.com> References: <1363872029259-5729614.post@n5.nabble.com> From: Claus Ibsen Date: Fri, 22 Mar 2013 07:55:37 +0100 Message-ID: Subject: Re: Permanent Suspension of Routes To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Mar 21, 2013 at 2:20 PM, sushil_vsk5 wrote: > Hello: > I have been able to successfully suspend and resume routes using the > relevant JMX operations. However, when the container [app server] is > restarted, the routes again start up which I do not want. I want that > whatever routes have been suspended should remain so even after server > restarts till the time I explicitly resume them again. Is it possible to > implement this somehow? > Regards, > Sushil > I guess setting autoStartup false on camel context. And use an event listener, and listen when camel has been started. And then load from a persisten store the data that tells you which routes to start. Then start them using the api on CamelContext. And the even listener allows you to keep track when a route is stopped also. Then you can update your persisten store to reflect that change. A little example about the event notifier is here http://camel.apache.org/eventnotifier-to-log-details-about-all-sent-exchanges.html And the even objects we have is in this package http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/management/event/package-summary.html > > > -- > View this message in context: http://camel.465427.n5.nabble.com/Permanent-Suspension-of-Routes-tp5729614.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: cibsen@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen