Hi there. So I am gladly responsing to myself :-) I found the solution just yesterday in another blog post:
You just have to hold the DataSource (ds) using ds.hold(), to prevent the CXF to remove the cached file. So you can use the stream over and over again (without resetting it), and it is deleted from the cache temp dir only after you released it via ds.release(). Simple! Here the URL to the post I found: http://ext2xhb.wordpress.com/2011/06/08/using-cxf-attachment-safely/ Thanks! Stefan. -- View this message in context: http://cxf.547215.n5.nabble.com/Caching-MTOM-attachments-and-working-with-cached-DataHandler-tp5529487p5664385.html Sent from the cxf-user mailing list archive at Nabble.com.
