Re: File Component (2.0-M2) not polling

2009-07-22 Thread Carlo Camerino
add a thread.sleep at the end of the main method. or thread.wait On Thu, Jul 23, 2009 at 1:52 AM, Jon Anstey wrote: > I think your main method is terminating before Camel has a chance to do > anything. org.apache.camel.spring.Main actually starts up a new main thread > and waits for completion s

Re: Velocity component use of org.apache.camel.velocity.resourceUri header

2009-07-22 Thread tide08
Thanks Jon! I had to defer back to use custom beans. I tried extending velocity endpoint but ended up duplicating everything as resource uri and buffer is not exposed. May be it is good idea to make velocity endpoint use some header as template resource? Is there something similar for 2.0? ti

Re: File Component (2.0-M2) not polling

2009-07-22 Thread Jon Anstey
I think your main method is terminating before Camel has a chance to do anything. org.apache.camel.spring.Main actually starts up a new main thread and waits for completion so it doesn't exit right away. If it fits your usecase, I would recommend just using org.apache.camel.spring.Main. Cheers, J

Re: Velocity component use of org.apache.camel.velocity.resourceUri header

2009-07-22 Thread Jon Anstey
Yeah, you kinda have to read it a few times to catch that :) I've updated the docs to be a bit more explicit. If you want to extend VelocityEndpoint to reload templates most of the work is already done in the onExchange method (it already creates a new velocity context every time). Though, if you

File Component (2.0-M2) not polling

2009-07-22 Thread arhan
Hi! I have a following code for processing files (see the code below). And there's a difference in the file component behavior depending on how do I start the app. 1) When using the org.apache.camel.spring.Main the application initializes and starts to poll the directory with desired periods/d