On Fri, Feb 3, 2012 at 5:04 PM, Hadrian Zbarcea <hzbar...@gmail.com> wrote: > Babak's link should help. That is useful mostly when you run manually using > something like camel:run. Another option is to wait for an event after > context.start() and at the end of your processing trigger the event. That > way your wait time will be no longer than needed.
Babak is describing something I don't want - I do not want it to start and then run until I kill it. Hadrian, I think you're talking about what I want, but I'm not sure how to do it. :-) I have a remote process that creates some files in a directory, then this code is launched after all of the files exist. I want this process to start up, read and process each file, then exit. I'm looking for is a way for this route to stay alive until either all files are processed or the file consumer tells me there are no files to be processed. It seems like instead it is stopping before it gets a chance to start. Is the answer to create a route that waits for a message from the file processing route that somehow tells camel to shut down? That seems overly complex...I think I'd prefer adding a long wait time to that. It'd be perfect if you could somehow tell camel to stay alive until the route completed at least one time. Larry