You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Adrian Trenaman <tr...@progress.com> on 2010/06/25 13:31:13 UTC
Can a route shut itself down?
Hi Community,
I'd like to be able for a route to be able to intelligently shut itself
down: for example, if the route discovers that a DB connection or some
other back-end service is unavailable, then it should gracefully shut
itself down and then be restartable through human intervention, for
example, through JMX.
Thoughts?
Best,
Ade.
Re: Can a route shut itself down?
Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Jun 25, 2010 at 1:37 PM, Adrian Trenaman <tr...@progress.com> wrote:
> Thanks Claus,
>
> Got befuddled by a Google search with lots of noise: thanks for pointing me
> in the right direction.
>
Basically you could use onCompletion to do after work which allows you
to invoke the stopRoute / shutdownRoute on the CamelContext to shut
itself down.
> Cheers,
> Ade.
>
> On 25/06/2010 12:35, Claus Ibsen wrote:
>>
>> On Fri, Jun 25, 2010 at 1:31 PM, Adrian Trenaman<tr...@progress.com>
>> wrote:
>>
>>>
>>> Hi Community,
>>>
>>> I'd like to be able for a route to be able to intelligently shut itself
>>> down: for example, if the route discovers that a DB connection or some
>>> other
>>> back-end service is unavailable, then it should gracefully shut itself
>>> down
>>> and then be restartable through human intervention, for example, through
>>> JMX.
>>>
>>>
>>
>> Yes see chapter 13 of the Camel book.
>> And it has also been debated in this forum so a bit of search and you
>> can find threads about it.
>>
>>
>>
>>
>>
>>>
>>> Thoughts?
>>>
>>> Best,
>>> Ade.
>>>
>>>
>>
>>
>>
>
--
Claus Ibsen
Apache Camel Committer
Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Re: Can a route shut itself down?
Posted by Adrian Trenaman <tr...@progress.com>.
Thanks Claus,
Got befuddled by a Google search with lots of noise: thanks for pointing
me in the right direction.
Cheers,
Ade.
On 25/06/2010 12:35, Claus Ibsen wrote:
> On Fri, Jun 25, 2010 at 1:31 PM, Adrian Trenaman<tr...@progress.com> wrote:
>
>> Hi Community,
>>
>> I'd like to be able for a route to be able to intelligently shut itself
>> down: for example, if the route discovers that a DB connection or some other
>> back-end service is unavailable, then it should gracefully shut itself down
>> and then be restartable through human intervention, for example, through
>> JMX.
>>
>>
> Yes see chapter 13 of the Camel book.
> And it has also been debated in this forum so a bit of search and you
> can find threads about it.
>
>
>
>
>
>> Thoughts?
>>
>> Best,
>> Ade.
>>
>>
>
>
>
Re: Can a route shut itself down?
Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Jun 25, 2010 at 1:31 PM, Adrian Trenaman <tr...@progress.com> wrote:
> Hi Community,
>
> I'd like to be able for a route to be able to intelligently shut itself
> down: for example, if the route discovers that a DB connection or some other
> back-end service is unavailable, then it should gracefully shut itself down
> and then be restartable through human intervention, for example, through
> JMX.
>
Yes see chapter 13 of the Camel book.
And it has also been debated in this forum so a bit of search and you
can find threads about it.
> Thoughts?
>
> Best,
> Ade.
>
--
Claus Ibsen
Apache Camel Committer
Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus