-
Nov 6th, 2012, 07:14 AM
#1
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...
-
Nov 6th, 2012, 07:23 AM
#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) http://blog.springsource.org/2012/09...nchronization/
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules