Hi On 01/03/12 22:47, Stefan Funk wrote:
Hi dear list,I am using MTOM to transfer data to my service, and it works just fine. I now would like to cache the attachment so I am able to work with a cached input stream, to rewind the stream and use it as often as I like (for I am writing the data to different databases one after another, so I need the data more than once, but I do not want to keep everything in memory). I do set in my beans.xml the following: <jaxws:properties> <entry key="mtom-enabled" value="true" /> <entry key="attachment-directory" value="/data/tmp/" /> <entry key="attachment-memory-threshold" value="0" /> </jaxws:properties> I also tried to set -Dorg.apache.cxf.io.CachedOutputStream.Threshold=0 -Dorg.apache.cxf.io.CachedOutputStream.OutputDirectory=/data/tmp/ at Tomcat start. /data/tmp is writable for my tomcat-user, but there is no data written to /data/tmp/ when the service is getting data from the client. My CXF version is 2.5.2. Am I misconfiguring something? Maybe I get a cached input stream automatically if I get the caching running? Maybe someone has an short answer to this or just point to some existing post (I didn't find...).
I looked at the source, CachedOutputStream defaults to a 64K threshold if the configuration value is <= 0, so setting it to '1' or some other small value should do for all the parts
Cheers, Sergey
Thank you very much and good night! Stefan. -- View this message in context: http://cxf.547215.n5.nabble.com/Caching-MTOM-attachments-and-working-with-cached-DataHandler-tp5529487p5529487.html Sent from the cxf-user mailing list archive at Nabble.com.
