Announcement Announcement Module
Collapse
No announcement yet.
FTP Inbound Channel Adapter - Write file with a different name Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • FTP Inbound Channel Adapter - Write file with a different name

    I have an issue with FTP inbound channel adapter. On the FTP server, a file is posted with the same name for every 2 hours. I am downloading it using the FTP inbound channel adapter; however, after the file is put on the channel, I am trying to delete it from my local folder. I am not able to do it as Tomcat has a lock on it. Is there any way that I can download the file by writing it with a unique file name in my local directory? Or is there any other idea that could work in this situation?

    Any help is greatly appreciated.

    Thanks!

  • #2
    My application is deployed using Spring Integration 2.0.3 with Tomcat 7 under Windows Server 2003.

    Thanks.

    Comment


    • #3
      What do you mean "writing it with unique file name"? Would the result be the same? I am just trying to understand what how "unique file name" relates to this?

      Comment


      • #4
        On polling the ftp server for the first time, I will be able to download it to my local folder and the file is placed on the channel for processing. From the next poll onwards, since Tomcat has a lock on the file (download from previous poll) it would not be deleted from the folder - at this point the file is 'marked' for deletion and would be deleted upon recycle of TC. Since the file is present in the local folder from previous poll, FTP inbound processor would not pick up the new file from the FTP server. In the meanwhile, if the frequency period of 2 hours is lapsed, the file on the FTP server is replaced with a new batch. I am thinking this could be avoided if I can download the file from FTP server but write it with a different but unique file name.

        Thank you!

        Comment


        • #5
          So basically what you are saying is that once the file has been transfered to a directory specified by the 'local-directory' attribute of the inbound adapter, that file can not be deleted (at this time) unless you shut down the process. Right?

          If so this might be a whole different issue which could be a bug. Need to look, so if you can open a JIRA - "Downloaded files are locked for the duration or FTP Inbound adapter process, thus can't be deleted".

          Also, you may want to open new feature request to provide an ability to specify file names for inbound adapter. We do have this capability on the outbound-adapter, but not on the inbound.

          Comment


          • #6
            Thank you, will let you know when done.

            Comment


            • #7
              INT-1843 created for the bug.

              Comment


              • #8
                INT-1844 is created for the feature request.

                Comment

                Working...
                X