|
From: Michal P. <pl...@nc...> - 2005-08-10 00:58:45
|
Hi !
I've got problem with deleting attached file as payload after
successfully sent message. Seems that attached file is lock'ed. Doing
something like this:
<stub>
File payload = new File("payload.xml");
...
...
AttachmentDataSource ads = new AttachmentDataSource( payload,
"application/xml" );
DataHandler dataHandler = new DataHandler( ads );
message.addPayloadContainer( dataHandler, payload.getName(),
"description" );
....
....
message.saveChanges();
mshRequest.send( message );
if ( !payload.delete() ) {
//and can't delete file
System.out.println( "always return false" );
}
</stub>
I was checking read/write rights and always returned true.
Can anybody help me with it???
|