[ 
https://issues.apache.org/jira/browse/CAMEL-10505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15687221#comment-15687221
 ] 

ASF GitHub Bot commented on CAMEL-10505:
----------------------------------------

GitHub user apoltavtsev opened a pull request:

    https://github.com/apache/camel/pull/1295

    [CAMEL-10505] FILE component - resolved FileNotFountException in Gene…

    …ric File Rename Exclusive Read Lock Strategy in case of work file is 
locked by another application

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apoltavtsev/camel CAMEL-10505

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/1295.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1295
    
----
commit cdc6dd0ad06d6ceb1ce3704f43937bbb4765c7dd
Author: [email protected] <[email protected]>
Date:   2016-11-22T12:39:11Z

    [CAMEL-10505] FILE component - resolved FileNotFountException in Generic 
File Rename Exclusive Read Lock Strategy in case of work file is locked by 
another application

----


> "FILE" component with option "readLock=rename" throws FileNotFound exception 
> in case of work file is locked/used by another application
> ---------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-10505
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10505
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.17.3
>         Environment: Windows 7 / Java 8.
>            Reporter: Andrey Poltavtsev
>             Fix For: 2.17.4, 2.18.1, 2.19.0
>
>         Attachments: camel-core.patch, diff.txt
>
>
> Option "readLock=rename" (according to htttp://camel.apache.org/file2.html) 
> is necessary to lock work file in case of it is not used by another 
> application. But currently we see "FileNotFound" during test rename operation 
> and "FILE" component tries to lock and process corresponding work file.
> This issue can be resolved by wrapping of corresponding rename operation by 
> try-catch block. See diff.txt for 
> "camel-core/src/main/java/org/apache/camel/component/file/strategy/GenericFileRenameExclusiveReadLockStrategy.java"
>  in attachment which shows way to correct current issue.
> [Similar 
> issue|http://stackoverflow.com/questions/40040023/cannot-rename-file-warning-while-using-idempotent-readlock-in-camel]
>  is applicable for previous Camel version also.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to