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 E11239E61 for ; Wed, 18 Apr 2012 22:48:33 +0000 (UTC) Received: (qmail 80976 invoked by uid 500); 18 Apr 2012 22:48:33 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 80948 invoked by uid 500); 18 Apr 2012 22:48:33 -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 80940 invoked by uid 99); 18 Apr 2012 22:48:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Apr 2012 22:48:33 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 216.139.236.26 is neither permitted nor denied by domain of brbornia@gmail.com) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Apr 2012 22:48:27 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1SKdfS-0001RT-Ar for users@camel.apache.org; Wed, 18 Apr 2012 15:48:06 -0700 Date: Wed, 18 Apr 2012 15:48:06 -0700 (PDT) From: brbornia To: users@camel.apache.org Message-ID: <1334789286326-5650374.post@n5.nabble.com> In-Reply-To: <1334774025488-5649895.post@n5.nabble.com> References: <1334604455296-5644759.post@n5.nabble.com> <1334686494023-5647196.post@n5.nabble.com> <1334700128320-5647730.post@n5.nabble.com> <1334774025488-5649895.post@n5.nabble.com> Subject: Re: File2 endpoint issue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Dam, too early to say I=C2=B4m 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: =09 =09 The problem I am facing now is that my quartz job is ignored after the firs= t execution, and the execution interval is changed to the default of the file endpoint. Here is my poll strategy class: public class CustomPollingConsumerPollStrategy implements PollingConsumerPollStrategy{ =09@Override =09public boolean begin(Consumer consumer, Endpoint endpoint) { =09=09return true; =09} =09@Override =09public void commit(Consumer consumer, Endpoint endpoint, int filesProcessed) { =09=09if(filesProcessed =3D=3D 0){ =09=09=09throw new RuntimeException("The file was not received in the expec= ted date and time"); =09=09} =09} =09@Override =09public boolean rollback(Consumer consumer, Endpoint consumerEndopint, in= t retryCounter,=09Exception exception) throws Exception { =09=09Map headers =3D new HashMap(); =09=09headers.put("customHeader", "customHeader"); =09=09 =09=09CamelContext context =3D new DefaultCamelContext(); =09=09ProducerTemplate template =3D context.createProducerTemplate(); =09=09template.sendBodyAndHeaders("vm:failure", exception.getMessage(), headers); =09=09return false; =09} } What am I missing now? Thanks again, Bruno. -- View this message in context: http://camel.465427.n5.nabble.com/File2-endpo= int-issue-tp5644759p5650374.html Sent from the Camel - Users mailing list archive at Nabble.com.