[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3188) ConcurrentModificationException on flush of ServerConversationContext

Sanne Grinovero (JIRA) jira-events at lists.jboss.org
Sat Jul 26 13:21:44 EDT 2008


    [ https://jira.jboss.org/jira/browse/JBSEAM-3188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12422649#action_12422649 ] 

Sanne Grinovero commented on JBSEAM-3188:
-----------------------------------------

Hi Pete, nice to see you commenting on this.
You're absolutely right about an example, but this is hard to isolate from the complex code, as it doesn't reveal itself in simple situations.

When using the "patch" we made we don't get the exception, so this should be a proof of the fact that
somehow the flush method is doing some potential modification of the "additions" HashMap.
This didn't happen in version 2.0.2 and previous.

I'll see if we manage to isolate the situation, but that seems unlikely.
Either Seam shouldn't make changes of the map in this block, or make a copy of it as in the attached code.
What are your thoughts?



> ConcurrentModificationException on flush of ServerConversationContext
> ---------------------------------------------------------------------
>
>                 Key: JBSEAM-3188
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-3188
>             Project: Seam
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.3.CR1
>         Environment: 2.0.3.CR1, JBoss 4.2.2, JDK 5
>            Reporter: Sanne Grinovero
>         Attachments: JBSEAM-3188.patch
>
>
> As confirmed by other people on the forum at http://seamframework.org/Community/ConcurrentModificationExceptionAfterProgrammaticLogin
> It is possible for ServerConversationContext to iterate on an EntrySet which is modified in the iteration block.
> I couldn't understand exactly in which scenarios it happens, but it's easy to patch the code
> to iterate on a copy instead (I'll attach the patch).
> I can't say if it's correct to make a copy, or if you should actually avoid the changes.

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

        



More information about the seam-issues mailing list