2 Replies Latest reply on Jan 29, 2010 9:30 AM by Marcel Casado

    Can MTOM attachments sent to a CXF web service be processed in parallel ?

    Marcel Casado Novice

      Hi,

       

      I have a CXF web service deployed on Fuse ESB, the soap request contains an array of the same xml element that contains an attachment on each one. I want to process them (save them to disk an then process them) in parallel using a different thread for each element containing an attachment using the "java.util.concurrent"  multithreading features. For each element in the list I got a DataHandler and then I get the InputStream to save the attachment to a file using a BufferOutStream. My code is thread safe.  When I test the service Im getting weird exceptions when the attachments are going to be saved to a file that I'm not able to figure out what is wrong. The service works fine if I process the attachments sequentially but takes for ever.

       

      Is there something in the way that MTOM attachments are processed on CXF that does not allow to process them in parallel ?

       

      Thanks in advance,

       

      -Marcel