Uploaded image for project: 'Commons VFS'
  1. Commons VFS
  2. VFS-488

Java Program does not exit or throw an exception when a FileObject being read from is accessed by another process

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.0
    • None
    • Development

    Description

      Scenario:
      1. Program A moves a large file "abc.txt" from source SFTP server to a target SFTP server.
      2. While the file is being moved by Program A, Program B resolves the same file "abc.txt" and starts writing to it OR renames the file "abc.txt"

      Issue:
      1. Program A that has an open input stream to abc.txt does not exit or throw an exception
      2. I'm thinking Program A keeps waiting on inputstream.read() as it is a blocking operation

      Is this a known issue, and if it is, any work around? Or in other words, can Program B somehow determine that "abc.txt" is being written to by an external process?

      Attachments

        Activity

          People

            Unassigned Unassigned
            sathish.sreedharan Sathish Sreedharan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: