camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Camel Guy <ca...@devguy.com>
Subject Re: Self-termination of a Camel program
Date Fri, 30 May 2014 17:34:55 GMT
Thanks Matt. I believe I do that myself too. Do you poll
context.getStatus.isStopped ?

~cg


On Thu, May 29, 2014 at 10:22 AM, Matt Payne <Payne@mattpayne.org> wrote:

> I have this working using
>
> org.apache.camel.main.Main
>
> I can send an example after work.  My guess is that someone will send an
> example before that.
>
> --Matt Payne
>
>
> On Thu, May 29, 2014 at 12:12 PM, Camel Guy <camel@devguy.com> wrote:
>
> > Hello again fellow riders,
> >
> > I would like to my camel program to terminate shortly after the camel
> > context stops.
> >
> > I know how to stop a camel context in a background thread. I have indeed
> > verified that no routes are running via jconsole. etc.
> >
> > When using the Maven camel-exec plugin, apparently the process must be
> > killed (via, say, sigint) even after the camel context stops.
> >
> > It appears that I need to write my own Java class (e.g. with static main)
> > that starts the context and polls context.getStatus to determine when to
> > exit. I wanted to double check first. I know this topic has been
> discussed
> > many times before but obviously I didn't find an answer in the search
> > results. Perhaps someone has a better suggestion.
> >
> >
> > Thank you,
> > cg
> >
>
>
>
> --
> --Matt Payne
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message