Announcement Announcement Module
No announcement yet.
Delete File after readed Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Delete File after readed

    How i can delete a file after readed?
    I mean, i have a inbound adapter for read a file from system file and send to a Queue, and i want to delete the file after delivery...

  • #2
    Well, the simples way to do that would be to use the new feature of Spring Integration 2.2 - Transaction Synchronization which allows you to synchronize user operations with a completed transaction. Obviously File is not a transactional system, but for the convenience we provide a PseudoTransctionManager to accomplish that.
    Anyway, you can get more details from one of the blogs we did few weeks ago (by Gary Russell)

    In fact the example there is using file adapter and renames the file after its been read, but you can easily execute delete() command instead of rename.
    Hope that helps