Results 1 to 4 of 4

Thread: ftp-outbound-adapter interceptor

  1. #1
    Join Date
    Aug 2010
    Posts
    8

    Default ftp-outbound-adapter interceptor

    Hi all,
    I'm using ftp-outbound-adapter to send ftp file on a remote directory. I need to update a table into the DB only if the file is successfully sent. How to?
    Channel interceptor, if I understand it correctly, doesn't resolve this use case.

  2. #2
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    Well, you CAN use channel interceptor (postSend) for now, however i would clearly state that it would be a temporary workaround.
    What we need to do is expose ftp:outbound-gateway. This would allow us to generate a response (e.g., ftp status code) which you can use to determine what further action should be taken (in your case you would do a write to a db).

    Could you please create an feature request in JIRA https://jira.springsource.org/browse/INT (if you don't have an account create one). This way you'd be notified when it is done, or let us know and we create one for you and you can add yourself as a watcher.
    Cheers

  3. #3
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,016

    Default

    You can also consider ordered subscribers to a <publish-subscribe-channel/>, as long as the channel is synchronous, or runs with an executor with a single thread, the second consumer (by default) will only receive the message if the first consumer is successful.
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

  4. #4
    Join Date
    Feb 2011
    Posts
    1

    Default failover

    Hi,

    you can set the "failover" flag to false, on the consumer channel.
    In this way, all Exceptions will be throws out ftp-outbound-adapter by the client. (eg access failed, banned server ..)
    Then you can resolved with simple try-catch block on client.

    Bye !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •