JIRA

  • Log In Access more options
    • Online Help
    • GreenHopper Help
    • Agile Answers
    • Use Agile By Default
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Agile Access more options (Alt+g)
  • Create Issue
  • Mule
  • MULE-1503

Make sure the FTP connector can write to a temp file

  • Agile Board
  • More Actions
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.3.3
  • Fix Version/s: None
  • Component/s: Core: Transports
  • Labels:
    None
  • Similar Issues:
    None

Description

In my experience I have already done a lot of integration using FTP. Typically source or destination applications reside on some ancient AS/400 system only capable of writing or reading files. FTP is also used in a lot of B2B scenario's.
Since the process that will be reading the files we've sent to the FTP site typically does not know anything about file locking, we need to write the file with a .tmp (or whatever) extension first, and afterwards rename it to the correct filename.
If we don't use the above scenario, we might have a problem if the process on the FTP site starts reading the file, while we're still "Streaming" it.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Hide
    Zip Archive
    FtpConnector.zip
    16/Mar/07 03:53 AM
    6 kB
    kenneth westelinck
    1. Java Source File
      FtpConnector.java 12 kB
    2. Java Source File
      FtpMessageDispatcher.java 9 kB
    3. Java Source File
      FtpMessageDispatcherFactory.java 0.6 kB
    Download Zip
    Show
    Zip Archive
    FtpConnector.zip
    16/Mar/07 03:53 AM
    6 kB
    kenneth westelinck

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Transitions
  • Commits
  • Source
  • Builds
Hide
Permalink
kenneth westelinck added a comment - 16/Mar/07 03:53 AM

Attached you can find working code that creates temp files first and then renames it. Configure it like this:
<connector name="myFTPConnector"
className="org.foo.mule.providers.ftp.FtpConnector">
<properties>
<map name="serviceOverrides">
<property name="dispatcher.factory" value="org.foo.mule.providers.ftp.FtpMessageDispatcherFactory"/>
</map>
<property name="outputPattern" value="${UUID}.xml"/>
<property name="tempOutputPattern" value="${UUID}.tmp"/>
</properties>
</connector>
I have taken the code from 1.3.3 as a base. Hope it's not too much work to merge it with the mainstream code.

Show
kenneth westelinck added a comment - 16/Mar/07 03:53 AM Attached you can find working code that creates temp files first and then renames it. Configure it like this: <connector name="myFTPConnector" className="org.foo.mule.providers.ftp.FtpConnector"> <properties> <map name="serviceOverrides"> <property name="dispatcher.factory" value="org.foo.mule.providers.ftp.FtpMessageDispatcherFactory"/> </map> <property name="outputPattern" value="${UUID}.xml"/> <property name="tempOutputPattern" value="${UUID}.tmp"/> </properties> </connector> I have taken the code from 1.3.3 as a base. Hope it's not too much work to merge it with the mainstream code.
Hide
Permalink
Dirk Olmes added a comment - 05/Nov/07 12:14 AM

see http://www.nabble.com/forum/ViewPost.jtp?post=13561359&framed=y for further discussion and a patch.

Kenneth, can you add your patches to this JIRA instead of posting them to the list? That makes sure we don't have to dig around for the required info.

Thanks

Show
Dirk Olmes added a comment - 05/Nov/07 12:14 AM see http://www.nabble.com/forum/ViewPost.jtp?post=13561359&framed=y for further discussion and a patch. Kenneth, can you add your patches to this JIRA instead of posting them to the list? That makes sure we don't have to dig around for the required info. Thanks
Hide
Permalink
kenneth westelinck added a comment - 19/Aug/08 08:50 AM

This issue has been open for some time now. Will this ever by merged with the mainstream FTP connector or is the rename capability for an FTPMessageDispatcher not interesting?

Show
kenneth westelinck added a comment - 19/Aug/08 08:50 AM This issue has been open for some time now. Will this ever by merged with the mainstream FTP connector or is the rename capability for an FTPMessageDispatcher not interesting?
Hide
Permalink
Ross Mason added a comment - 29/Nov/08 05:46 PM

Hi Kenneth,

Looks like the timing is off on this one. The issue now is that the the code submitted is on a very old code line. This is why we only accept patches, since they are much better at describing what actually changed.

Show
Ross Mason added a comment - 29/Nov/08 05:46 PM Hi Kenneth, Looks like the timing is off on this one. The issue now is that the the code submitted is on a very old code line. This is why we only accept patches, since they are much better at describing what actually changed.
Hide
Permalink
kenneth westelinck added a comment - 30/Nov/08 02:45 AM

Hi Ross,

Thanks for your comment. So what should I do then. Create a patch for the Mule 2.x trunk?

Show
kenneth westelinck added a comment - 30/Nov/08 02:45 AM Hi Ross, Thanks for your comment. So what should I do then. Create a patch for the Mule 2.x trunk?
Hide
Permalink
Ross Mason added a comment - 30/Nov/08 02:18 PM

Hi, Yes a patch on the 2.x code-line would be good.

Show
Ross Mason added a comment - 30/Nov/08 02:18 PM Hi, Yes a patch on the 2.x code-line would be good.

People

  • Assignee:
    Unassigned
    Reporter:
    kenneth westelinck
Vote (3)
Watch (3)

Dates

  • Created:
    16/Mar/07 03:50 AM
    Updated:
    30/Nov/08 02:18 PM

Agile

  • View on Board
  • Atlassian JIRA (v5.0.7#734-sha1:8ad78a6)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for MuleForge. Try JIRA - bug tracking software for your team.