|
[
Permlink
| « Hide
]
Stefano Bagnara added a comment - 04/Aug/06 04:32 PM
Let's mark this fixed. Optimism never killed anyone ;-)
Iwasa Kazmi found another way to reproduce this issue:
---- I inserted Redirect mailet in the "transport" processor. (see config.xml.diff) It duplicates a message for local-user before the RemoteDelivery runs. Then I sent a mail to the external server via james. FileStreamStore file in the spool was not deleted. ---- Optimism didn't work yesterday... let's test it again...
The main problem was that we were duplicating a Mail object using "new MailImpl(Mail)" that create a CoW proxy for the shared MimeMessage and then we were calling setMessage that replaced the previous message with no care of its "unreferencing". So, now, if we call setMessage and a message was already there then we dispose the previous one first, and then we set the new one. I also added a few mail.dispose to mailets that created local duplicates of serviced Mail and were not disposing it (AbstractRedirect, DSNBounce....). Doing all this stuff I also thought that if something gone wrong after the mail duplication and before the disposal we would have leaked, so I added a few try/finally code to make sure the dispose was called anyway. Closing issue fixed in released version.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||