Re: File2 endpoint issue

2012-04-19 Thread brbornia
Ok, I finally found it. What CronScheduledRoutePolicy does is suspend the route and activate it in the scheduled time, so all I needed to do is suspending the route in my rollback method like this: consumerEndopint.getCamelContext().suspendRoute("myRoute"); Since in the rollback method I receive

Re: File2 endpoint issue

2012-04-18 Thread brbornia
Dam, too early to say I´m done... :( Requirerment changed, and now I have a new issue. I needed to change the polling interval from delay property to a quartz job like this: The problem I am facing now is that my quartz job is ignored after the first execution, and the e

Re: File2 endpoint issue

2012-04-18 Thread brbornia
Great, The ProducerTemplate worked very well, and now I could implement the features I needed. Thank you very much for your help :) Bruno -- View this message in context: http://camel.465427.n5.nabble.com/File2-endpoint-issue-tp5644759p5649895.html Sent from the Camel - Users mailing list arch

Re: File2 endpoint issue

2012-04-17 Thread Claus Ibsen
On Wed, Apr 18, 2012 at 12:02 AM, brbornia wrote: > Hey guys, > > Forget my last post, I´m feeling stupid right now... The method begin must > return true to continue with the polling. After I fixed that, the polling > strategy started working as expected. > Yes read the javadoc of the methods. A

Re: File2 endpoint issue

2012-04-17 Thread brbornia
Hey guys, Forget my last post, I´m feeling stupid right now... The method begin must return true to continue with the polling. After I fixed that, the polling strategy started working as expected. Now, I have another question related to that. I have set in my context an error handler like this:

Re: File2 endpoint issue

2012-04-17 Thread brbornia
Hi guys, Thanks for your replies, but none of them worked for me. Probably I am still doing somthing wrong, I just starting with camel. In my tests, the interceptor only worked when a file was actualy received, so looks like I cannot use it do do what I want. About the custom polling strategy I

Re: File2 endpoint issue

2012-04-17 Thread Claus Ibsen
Hi You can use a custom PollingConsumerPollStrategy where there commit method will have the number of files processed. So if this number is 0, then you know there was no files to poll. See details at: http://camel.apache.org/polling-consumer.html On Mon, Apr 16, 2012 at 9:27 PM, brbornia wrot

Re: File2 endpoint issue

2012-04-17 Thread Filippo Balicchia
You can you interceptFrom().when(simple("${file:length} == 0")) --filippo Il 16 aprile 2012 21:27, brbornia ha scritto: > Hello guys, > > I am working on a route like this to handle files that should arrive every > day: > > >   >  <... do_stuff_here/> > > > If the file does not arrive, the d