Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5BE5F9179 for ; Tue, 7 Feb 2012 17:28:27 +0000 (UTC) Received: (qmail 67447 invoked by uid 500); 7 Feb 2012 17:28:26 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 67387 invoked by uid 500); 7 Feb 2012 17:28:26 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 67373 invoked by uid 99); 7 Feb 2012 17:28:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2012 17:28:25 +0000 X-ASF-Spam-Status: No, hits=4.2 required=5.0 tests=HTML_MESSAGE,SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 216.139.236.26 is neither permitted nor denied by domain of ludalamar@gmail.com) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2012 17:28:18 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1Ruoph-0002SM-JZ for users@camel.apache.org; Tue, 07 Feb 2012 09:27:57 -0800 Date: Tue, 7 Feb 2012 09:27:57 -0800 (PST) From: Raul To: users@camel.apache.org Message-ID: In-Reply-To: <1328542744328-5460365.post@n5.nabble.com> References: <1328205162593-5451466.post@n5.nabble.com> <1328216950073-5451941.post@n5.nabble.com> <1328278021897-5453941.post@n5.nabble.com> <1328530159983-5459947.post@n5.nabble.com> <1328542744328-5460365.post@n5.nabble.com> Subject: Re: ExceptionHandler in a ftp Route MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2548_1436251.1328635677601" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_2548_1436251.1328635677601 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello again Babak, I have got to associate own custom ExceptionHandler to the Consumer of my FTP Route. But I continue to have problems to control "renaming/moving/deleting" of FTP. I have followed the code and the problem is that the ExceptionHandler of the Consumer is diferente of GenericFileOnCompletion. During the execution of FTP route is invoked the method *processExchange*of the class * GenericFileConsumer *then a "OnCompletion" is added of this way: *exchange.addOnCompletion(new GenericFileOnCompletion(endpoint, operations, target, absoluteFileName));* The exceptionHandler of this GenericFileOnCompletion is null, I belived that it used the exceptionHandler of the Consumer. And like you indicated me, if exceptionHandler is null then the LoggingExceptionHandler is used. The key is to change the ExceptionHandler of GenericFileOnCompletion but I don't know how do it. I have reread your advice and I have some doubt. First you say: " If you want to react differently on an encountered exception you can inject your own custom ExceptionHandler (for example into a FileConsumer)" I think like this class uses "new" is not possible inject the my ExceptionHandler to the GenericFileOnCompletion. Is it? On the other hand, you indicated me that other solution would be: "provide your own Synchronization implementation and do: exchange.addOnCompletion(MyHandler) For example from inside a Processor inside your route" In this case, will MyHandler be a simple class that implements Synchonization? How can I control with MyHandler the Exceptions of the "other" addOnCompletion? I mean, the Exceptions don't control of the "other" addOnCompletion are the problems during the "renaming/moving/deleting" Thank you again. -- View this message in context: http://camel.465427.n5.nabble.com/ExceptionHandler-in-a-ftp-Route-tp5451466p5463890.html Sent from the Camel - Users mailing list archive at Nabble.com. ------=_Part_2548_1436251.1328635677601--