Return-Path: X-Original-To: apmail-camel-dev-archive@www.apache.org Delivered-To: apmail-camel-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CCA52DFB5 for ; Tue, 23 Oct 2012 14:55:06 +0000 (UTC) Received: (qmail 68733 invoked by uid 500); 23 Oct 2012 14:55:06 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 68443 invoked by uid 500); 23 Oct 2012 14:55:04 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 68403 invoked by uid 99); 23 Oct 2012 14:55:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Oct 2012 14:55:03 +0000 X-ASF-Spam-Status: No, hits=3.5 required=5.0 tests=SPF_PASS,URIBL_BLACK X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [107.0.68.194] (HELO mail.dhlglobalmail.com) (107.0.68.194) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Oct 2012 14:54:58 +0000 Received: from atl-exch2.DHLGLOBALMAIL.CORP ([172.20.0.12]) by mail.dhlglobalmail.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 23 Oct 2012 10:54:37 -0400 x-mimeole: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Camel cold restart via JMX Date: Tue, 23 Oct 2012 10:54:35 -0400 Message-ID: <61664300480FCF4EAC0C1A5C431A6FCC35A33325@atl-exch2.DHLGLOBALMAIL.CORP> In-Reply-To: <9B43173219864AC38B50FEB1441FFF24@gmail.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Camel cold restart via JMX Thread-Index: Ac2w0dQ6uGxxi10xTkO7cvp6km7bhgAXFZkg References: <61664300480FCF4EAC0C1A5C431A6FCC3599185B@atl-exch2.DHLGLOBALMAIL.CORP> <61664300480FCF4EAC0C1A5C431A6FCC3599225B@atl-exch2.DHLGLOBALMAIL.CORP> <9B43173219864AC38B50FEB1441FFF24@gmail.com> From: "Daniel Gredler" To: X-OriginalArrivalTime: 23 Oct 2012 14:54:37.0470 (UTC) FILETIME=[52856BE0:01CDB12E] X-Virus-Checked: Checked by ClamAV on apache.org Hi Willem, That was fast :-) Thanks a ton; hopefully it'll be useful to others, as well. Take care, Daniel -----Original Message----- From: Willem jiang [mailto:willem.jiang@gmail.com]=20 Sent: Monday, October 22, 2012 11:52 PM To: dev@camel.apache.org Subject: Re: Camel cold restart via JMX Hi Daniel, It sounds good. I will take care of the patch today.=20 --=20 Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang=20 Weibo: willemjiang On Tuesday, October 23, 2012 at 3:02 AM, Daniel Gredler wrote: > Hi all, >=20 > After digging through the code, it appears to me that the changes can be > confined to ManagedCamelContextMBean and ManagedCamelContext, which is > much less invasive than what I had thought. >=20 > I've created a feature request to add support for cold restarts via JMX, > and have attached a proposed patch: >=20 > https://issues.apache.org/jira/browse/CAMEL-5734 >=20 > It's fairly small; I'd be grateful if someone could take a couple of > minutes to have a look. >=20 > Thanks! >=20 > Daniel >=20 >=20 > -----Original Message----- > From: Daniel Gredler [mailto:dgredler@dhlglobalmail.com]=20 > Sent: Friday, October 19, 2012 3:52 PM > To: dev@camel.apache.org (mailto:dev@camel.apache.org) > Subject: Camel cold restart via JMX >=20 > Hi guys, >=20 > I was thinking about creating a feature request, but it involves such a > fundamental aspect of Camel that I thought I'd ask here first. >=20 > I have a situation where I'd like to do a cold restart on a Camel > context (context.stop(), and then context.start()). The catch is that I > want to do this via JMX, and when the Camel context is stopped, the JMX > service goes down and obviously I can't issue the start() request. >=20 > I was thinking that it would be nice to have a restart() method on the > Camel context (defined as the equivalent of stop + start), possibly even > in the Service interface which defines the start() and stop() methods. > This would allow the Camel context to go down and come back up without > requiring a second start() request, which is nice when the start() > request is impossible. >=20 > Is it worth creating the feature request? Am I missing something that > obviates the need for such a feature? Or is the use case so narrow that > it doesn't really make sense to add? Let me know what you think... >=20 > Take care, >=20 > Daniel=20