[ 
http://issues.apache.org/jira/browse/JAMES-474?page=comments#action_12373739 ] 

Stefano Bagnara commented on JAMES-474:
---------------------------------------

Martijn, thank you for your comment.

This issue is not related to synchronization, btw I think I should review the 
synchronization in the MimeMessageWrapper because I changed it a lot and I 
didn't check the synchronizations lately. The problem here is that 2 
MimeMessageWrapper ends up sharing a single MimeMessageSource and the 
MimeMessageSource.dispose() call by one of them remove the source to the other 
message: I'm deciding wether to remove the optimization (as I did in the "fast 
fix") or introduce counters to know how much messages share the source.

I'm not sure that the issue you point about non synchronized property access in 
the constructor is valid, because I don't see how a content switch can happen 
during the constructor (can another thread get access to the object before the 
constructor is completely executed?).

They are not public, I think that field exists for a reason and getter/setter 
are not always the best thing. Btw, in this case I simply followed the style 
used in MimeMessage, as we extend that object and MimeMessage provide access to 
its internal via protected fields.


> NullPointerException and bodymessage lost with weird configurations in 
> message spooling
> ---------------------------------------------------------------------------------------
>
>          Key: JAMES-474
>          URL: http://issues.apache.org/jira/browse/JAMES-474
>      Project: James
>         Type: Bug

>   Components: James Core
>     Versions: 2.3.0a1
>     Reporter: Stefano Bagnara
>     Assignee: Stefano Bagnara
>     Priority: Critical

>
> Under particular condition the new MimeMessageWrapper optimization code seems 
> to loose the message source.
> I've already created a unittest for this and I remove the optimization, but 
> this need a fix.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to