camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ole Andreas Hegle <he...@businesscape.no>
Subject Re: FilePolling
Date Tue, 12 Jun 2007 17:47:06 GMT
Hi

I need at least functionality to disable the last-modified vs. polltime 
test, så I can create a fix for this.

How/where do I submit the patch when it is ready?

-Ole Andreas

Hiram Chirino wrote:
> On 6/12/07, Ole Andreas Hegle <hegle@businesscape.no> wrote:
>> Hi
>>
>> Yes, to make it optional would be nice.
>>
>> Other alternatives is to create an options for "delete processed files",
>> "move processed files" or to keep track of all files in the polled
>> folder to prevent files beeing polled twice, unless they are modified.
>>
>
> Those 3 strategies make lots of sense.. want to take a stab at
> implementing them ;-)
>
>> -Ole Andreas
>>
>>
>> James Strachan wrote:
>> > On 6/12/07, Rob Davies <rajdavies@gmail.com> wrote:
>> >> ooh - school boy error - want to issue a patch? - if not I'll try and
>> >> fix
>> >
>> > Should we just trash the lastModified > lastPollTime test? Or make it
>> > optional?
>> >
>> > James
>> >
>> >> On Jun 12, 2007, at 5:02 PM, Ole Andreas Hegle wrote:
>> >>
>> >> > Hi James
>> >> >
>> >> > Thank you for your answer.
>> >> >
>> >> > I have just found the problem, the file-poller worked when i
>> >> > modified the file, and it seems to me as the problem is located in
>> >> > org.apache.camel.component.file.FileConsumer.java and the method
>> >> >
>> >> > *protected* *void* pollFile(*final* File file) {
>> >> >    *if* (file.exists() && file.lastModified() > lastPollTime)
{
>> >> >        *if* (isValidFile(file)) {
>> >> >             processFile(file);
>> >> >        }
>> >> >    }
>> >> > }
>> >> >
>> >> >
>> >> > My files are sent as attachment to a receiver by email, and then
>> >> > imported to the system by saving the email-attachment in the folder
>> >> > monitored by the FileConsumer. The modified-timestamp will be older
>> >> > than the lastPollTime-timestamp, and because of this files will not
>> >> > be polled. Are there any way to dissable the 
>> file.lastModified-method?
>> >> > (I move the files to an archive folder when they are processed)
>> >> >
>> >> > Perhaps I can have another component running and modifying the
>> >> > files to change the last modified-timestamp on the files to make
>> >> > them pollable, but I would rather not...
>> >> >
>> >> > Anybody knows what I can do with this?
>> >> >
>> >> > Regards Ole Andreas
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
>
>


Mime
View raw message