FilePoller needs to add check for delete file before removing the file from 
workingset
--------------------------------------------------------------------------------------

                 Key: SM-706
                 URL: https://issues.apache.org/activemq/browse/SM-706
             Project: ServiceMix
          Issue Type: Improvement
          Components: servicemix-components
    Affects Versions: 3.0
         Environment: Windows XP/JSE 6
            Reporter: Los Morales
            Priority: Minor
             Fix For: 3.0


In the "processFileAndDelete(File aFile)" method of the 
org.apache.servicemix.components.file.FilePoller class, there is a finally 
block that contains a call to " workingSet.remove(aFile)".  This is called 
regardless if the file should be deleted or not.  Hence this works when the 
file is physically removed.  If the file is not physically removed but is 
removed from the Set, this poller will pick up the same file(s) again and again 
in the "pollFile(final File aFile)" method.  Maybe add a check in the finally 
block like this:
**************************
        finally {
            if (!aFile.exists())
               workingSet.remove(aFile);
        }
*************************

-los

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to