camel restart context

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

camel restart context

Damien Nicolas
Hello,

I need to restart the camel context with a quartz at fixed interval.
But when I do context.stop() and then context.start() inside quartz
processing; the context stop but doesnt start again...
Also, when I remotely invoke the JMX camel restart, it works.
Is this a normal behaviour?

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: camel restart context

Claus Ibsen-2
Hi

Yeah likely, see the FAQ
https://camel.apache.org/manual/latest/faq/how-can-i-stop-a-route-from-a-route.html

On Tue, Jan 14, 2020 at 11:45 AM Damien Nicolas <[hidden email]> wrote:

>
> Hello,
>
> I need to restart the camel context with a quartz at fixed interval.
> But when I do context.stop() and then context.start() inside quartz
> processing; the context stop but doesnt start again...
> Also, when I remotely invoke the JMX camel restart, it works.
> Is this a normal behaviour?
>
> Thanks.



--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2
Reply | Threaded
Open this post in threaded view
|

Re: camel restart context

Larry Shields
If you need a simple example for restarting a route from another route, I
have an example on Github below:
https://github.com/runstache/camel-restart-routes

There are 2 routes, the Maintenance route will restart the other routes
based on a file drop.

On Tue, Jan 14, 2020 at 6:38 AM Claus Ibsen <[hidden email]> wrote:

> Hi
>
> Yeah likely, see the FAQ
>
> https://camel.apache.org/manual/latest/faq/how-can-i-stop-a-route-from-a-route.html
>
> On Tue, Jan 14, 2020 at 11:45 AM Damien Nicolas <[hidden email]>
> wrote:
> >
> > Hello,
> >
> > I need to restart the camel context with a quartz at fixed interval.
> > But when I do context.stop() and then context.start() inside quartz
> > processing; the context stop but doesnt start again...
> > Also, when I remotely invoke the JMX camel restart, it works.
> > Is this a normal behaviour?
> >
> > Thanks.
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>