See this FAQ http://camel.apache.org/running-camel-standalone.html
It has links to how to keep it running. On Mon, Jun 13, 2011 at 6:33 AM, AnujK <reacha...@gmail.com> wrote: > A very simple use case running in a standalone JVM environment. > > I use the Main helper class provided by Spring Camel integration. > > Main.setApplicationContext("spring-config.xml") > Main.start() > Thread.sleep(180000); > Main.stop(); > > The configuration contains a simple 'sftp' route that pulls the files down > to a temp directory. > > There are a couple of questions: > a) If we dont have the Thread.sleep in our call, the Main routine actually > terminates without the sftp polling consumer even getting a chance to start. > b) If the sftp polling completed has finished the poll and downloaded the > files in one session, I want my Main to terminate. How is this feasible? > > Our deployment options do not generally call for a while(true) based > deployment. > > Any ideas would be helpful > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Need-control-back-in-the-Main-routine-so-that-we-can-terminate-JVM-tp4483312p4483312.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/