[ 
https://issues.apache.org/activemq/browse/SM-855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38617
 ] 

Guillaume Nodet commented on SM-855:
------------------------------------

The patch looks good, but i have two remarks:
  * could you please avoid tabs and use spaces instead ?
  * the pollFile() method, when concurrent is false has an empty loop: 
        while (!workingSet.isEmpty());
    such a loop is very cpu intensive, so it would be much better to use a wait
     and a notify .  Or maybe a better way would be to keep the pollFile() 
without
     any modification, but return an executor with a single thread when in a non
    concurrent mode.

> Non concurrent processing of files in LW FilePoller
> ---------------------------------------------------
>
>                 Key: SM-855
>                 URL: https://issues.apache.org/activemq/browse/SM-855
>             Project: ServiceMix
>          Issue Type: Improvement
>          Components: servicemix-components
>    Affects Versions: 3.1
>            Reporter: Juergen Mayrbaeurl
>             Fix For: 3.1.1, 3.2
>
>         Attachments: FilePoller.diff, FilePoller.diff
>
>
> LW FilePoller component always processes files concurrently. Sometimes it's 
> very important that files get processed in a defined sequence, because the 
> contents is depending on previously processed contents.
> I've extended the LW FilePoller class. It has a 'concurrent' property now 
> (default is true) and properties for sorting the incoming files (Sort by name 
> and last modification date, asc and desc)
> Maybe this functionality should be included in the LW FTP FilePoller and 
> servicemix-file BC, too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to