camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dvd <javatechi...@gmail.com>
Subject File Component Error handling
Date Sat, 09 Feb 2008 15:00:45 GMT

Hi,

I have defined following route:

exception(ValidationException.class).to("file:target/messages/invalid");
from("file:src/data?delete=true").convertBodyTo(String.class).
    to("validator:schema/person.xsd").
    to("file:target/messages/valid");

The validator throws an exception when an invalid message is polled from the
specified directory. It is routed correctly to the invalid target directory,
and the original message remains in the polling directory and is locked.
How can I change this behavior so that the invalid file also is deleted from
the polling directory, just like the valid messages ?

Any thoughts on this ?

Thanks.
Dirk
-- 
View this message in context: http://www.nabble.com/File-Component-Error-handling-tp15372041s22882p15372041.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message