You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Benson Margulies <bi...@gmail.com> on 2012/06/13 23:55:02 UTC

Who is supposed to close data handler streams for MTOM for clients?

If I've defined an SEI to include a bean that has a DataHandler, and
enabled MTOM, am I supposed to call close on the stream, or am I
supposed to carefully *avoid* calling close() on the stream?

Re: Who is supposed to close data handler streams for MTOM for clients?

Posted by Daniel Kulp <dk...@apache.org>.
On Wednesday, June 13, 2012 05:55:02 PM Benson Margulies wrote:
> If I've defined an SEI to include a bean that has a DataHandler, and
> enabled MTOM, am I supposed to call close on the stream, or am I
> supposed to carefully *avoid* calling close() on the stream?

I believe you are supposed to make sure YOU call close on it.  If the 
DataHandler has it's data in a temp file, that would trigger the delete of 
the file.    If you don't call close, temp files may leak until the gc gets 
around to finalizing things.

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com