Bertrand, The file poller endpoint will only delete the file if it receives back the MessageExchange with a DONE status. In order to prevent the file from being deleted after a processing failure, you only have to set an error on the MessageExchange you received in your servicemix-bean POJO.
Now, the same mechanism is also used with regards to the HTTP endpoint: if you send a chunk of data in a separate MessageExchange to the HTTP endpoint at the moment when the network is down, you should be able to tell this from the status of the MessageExchange you just sent. Regards, Gert bgoetzmann wrote: > > Hello, > > I'm working on a ServiceMix application that is able to send large files > on HTTP (more here in french http://www.odelia-technologies.com/node/128); > the application works well, but I ask me some question about special > cases, for example whrn the network is down. > The application is a SA deployed on SM 3.3 and use, to send file, the > following services: > > servicemix-file -> servicemix-bean -> servicemix-http (as provider) > > A servicemix-file service detects files in a folder; when a file is > detected, the service-bean service is invoked (its onMessageExchange > method): it reads the binary content of the file by chunk of data and > sends each chunk to the servicemix-http service that acts as provider over > the wire. > > All is OK: when a file apperas in the folder, it is well sent over the > wire, and the file is deleted form the folder. > > But when I cut the network while the file is sent (debanching the cable), > the file is partially transmitted and deleted from the folder. An > exception occured in the servicemix-http service. > > In fact I wouldn't want the file be deleted if a problem occurs when > sending the file! > Any suggestion to handle this situation? How can the http service signals > a problem to the bean service? > > > Cheers, > > Bertrand. > > PS: my servicemix-bean service uses the sendSync method to send data > chunk. > ----- --- Gert Vanthienen http://gertvanthienen.blogspot.com -- View this message in context: http://www.nabble.com/Sending-large-files-on-HTTP-tp21127849p21140517.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
