Thanks! It looks like the trouble starts around line 119 in FileConsumer. The
call to "processStrategy.commit()" (which does the file movement) never gets
called because of the way the exception handling is done. 


Claus Ibsen wrote:
> 
> Hi Drew
> 
> I have created the JIRA ticket for tracking the bug: CAMEL-548
> https://issues.apache.org/activemq/browse/CAMEL-548
> 
> 
> 
> Med venlig hilsen
>  
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
> 
> -----Original Message-----
> From: Claus Ibsen [mailto:[EMAIL PROTECTED] 
> Sent: 24. maj 2008 09:38
> To: [email protected]
> Subject: RE: File Component Error handling
> 
> Hi Drew
> 
> Is there a JIRA ticket for this? If not please raise one and I will look
> into this asap. I do think your use-case is valid and that Camel should
> support his out-of-the-box.
> 
> If you could attach a small unit test sample that demonstrates the bug
> then it's super. 
> 
> 
> Med venlig hilsen
>  
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
> 
> -----Original Message-----
> From: Drew McAuliffe [mailto:[EMAIL PROTECTED] 
> Sent: 24. maj 2008 09:35
> To: [email protected]
> Subject: Re: File Component Error handling
> 
> 
> Has there been any movement on this issue with the file component? It kind
> of
> kills the use of the "exception" syntax for dealing with errors on file
> consumers, doesn't it? If, for example, the file is invalid XML, it should
> be processed, it's content moved on for notification, and then deleted
> (IMHO). I can't think of any reason to leave it around after exceptions
> are
> raised, other than by using the normal process of using the
> moveNamePrefix.
> If the file has been processed and its contents routed appropriately, what
> use it keeping it locked, where it will just keep throwing errors every
> time
> the connector polls?
> 
> 
> davsclaus wrote:
>> 
>> Hi
>> 
>> Could be a missing feature of the file component. Maybe there should be
>> an
>> option such as deleteOnFailure=true.
>> 
>> Some people would like the file to be deleted, others would like it to be
>> untouched etc, so there should be a parameter option to set the
>> behaviour.
>> 
>> If the feature is missing, please file a JIRA so its not forgotten.
>> 
>> 
>> 
>> dvd wrote:
>>> 
>>> 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-tp15372041s22882p17445214.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
> 
> 
> 

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

Reply via email to