What I fear is that I am mot applying the best practices and I am stuck a little bit with upload.
On upload I do not know how can I stream the content to the server and then into DB. (maybe I should create OutputStreamDataSource ?)
Any idea for upload ?
Should I use better the already done ByteArrayDataSource ? not the custom InputStreamDataSource ?
Do I have to use @StreamingAttachment(parseEagerly=true, memoryThreshold=4000000L)?
What if I don’t use @StreamingAttachment on WS , it will not use streaming ?
Thanks a lot.
I took a look on InputStreamDataSource and javax.mail.util.ByteArrayDataSourceand i realized that they acutal hava a byte of the 'document' in memory meaning the streaming ideea is in vain, cause what i try to avoid is to have multiple docs in the same time fully in memory.
So how can I stream from DB via WS and MTOM to a WS client ?