You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by oritush <or...@jumptap.com> on 2011/11/15 18:14:52 UTC
moveFailed in case of a method failure
I am using the moveFailed option for a file, which its endpoint is
bean/method:
from("file://sourceFolder?filter=#MyFilesFilter&moveFailed=error&move=success").to("bean:myParserService?method=parse");
what type of failures - throw an exception or return false - should the
'parse' method returns in order for the file to move to the 'error' folder?
thanks,
Orit
--
View this message in context: http://camel.465427.n5.nabble.com/moveFailed-in-case-of-a-method-failure-tp4995001p4995001.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: moveFailed in case of a method failure
Posted by oritush <or...@jumptap.com>.
10x, it works!
--
View this message in context: http://camel.465427.n5.nabble.com/moveFailed-in-case-of-a-method-failure-tp4995001p4998802.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: moveFailed in case of a method failure
Posted by boday <be...@initekconsulting.com>.
you should just be able to throw any exception that is not explicitly handled
otherwise (with onException(), etc)...see
https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerMoveAndMoveFailureTest.java
this unit test ...
oritush wrote:
>
> I am using the moveFailed option for a file, which its endpoint is
> bean/method:
>
> from("file://sourceFolder?filter=#MyFilesFilter&moveFailed=error&move=success").to("bean:myParserService?method=parse");
>
> what type of failures - throw an exception or return false - should the
> 'parse' method returns in order for the file to move to the 'error'
> folder?
>
> thanks,
> Orit
>
-----
Ben O'Day
IT Consultant -http://consulting-notes.com
--
View this message in context: http://camel.465427.n5.nabble.com/moveFailed-in-case-of-a-method-failure-tp4995001p4995091.html
Sent from the Camel - Users mailing list archive at Nabble.com.