You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by Atit <at...@gmail.com> on 2010/08/17 08:28:54 UTC

Modifying FilePoller.java to support auto rolling of archived files

Hi All,

The current File Poller SU (servicemix-file) can be confiugred to:
1. Reads files from a particular diretory 
2. Delete the read file 
3. Archive the read file in a particular directory

I have a requirement where i need the File Poller SU to archive the files
read to subfolder of a parent folder. These subfolders should be created by
date and all files read on one particular day should be archived in the
corresponding date subfolder.

I have scanned the tutorials for this but haven't found a way to implement
this. Have come across a way of implementing this?

If there is no way to implement this currently. i can try to implement this
in ServiceMix 3.3.1. 
I propose the following implementation:
1. create a new Poller EndPoint attribute called "rollFile"
2. Value of this attribute will be a data formatter pattern string (for
now). for example YYYYMMDD
3. Modify the FilePoller.java init() method to create an appropriate archive
directory (concatenated value of arhive and current timestamp formatted with
the value of rollFile)

Please revert back with your comments.

Thanks
Atit
-- 
View this message in context: http://servicemix.396122.n5.nabble.com/Modifying-FilePoller-java-to-support-auto-rolling-of-archived-files-tp2637765p2637765.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.