Yes ! Thank you Jayachandra ! I have modified the dispose() method to delete my files and that's work. The Garbage collector call dispose() after the message is sent.

Johann

2006/1/6, jayachandra <[EMAIL PROTECTED]>:
Hi,
I believe one might not worry of disposing the attachment from memory AFTER the message is sent, once the request-response session ends automatically the held up memory objects return back to pool. I see a protected finalize() method inside attachment part.

Jayachandra
 
On 1/6/06, Johann RENEL <[EMAIL PROTECTED] > wrote:
Hello,

The problem is : When execute the dispose() method.
I need to delete file AFTER the message sent, and where write the call to the dispose() methode.

Johann

2006/1/4, jayachandra <[EMAIL PROTECTED]>:
I haven't tried anything like what you said, but just wanted to know what is the problem you are facing accessing dispose() method.
I just checked the signature and it is a public method.
 
Thanks
Jayachandra
 
On 1/3/06, Johann RENEL <[EMAIL PROTECTED] > wrote:
Hello all,

I send attachments into a response message (into XXXXSOAPBindingImpl
generated by Axis with WSDL2Java):

-- code --

MessageContext msgContext = MessageContext.getCurrentContext();
Message msgResponse = msgContext.getResponseMessage();
...
File file = UtilitaireAttachement.recupereFichierAttachement(uri);
DataHandler dataHandler = new DataHandler(new FileDataSource(file));
AttachmentPart ap = new AttachmentPart(dataHandler);
ap.setContentId(uri.getPath());
msgResponse.addAttachmentPart(ap);
...

-- end code --

I would like to delete my file after the response was sent but I don't
know how to do it. I saw the dispose() method into AttachmentPart but
how to access it ?

Best regards,

Johann

PS : sorry for my "pitoyable" english :-)



--
-- Jaya




--
-- Jaya

Reply via email to