[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-7265) ConcurrentModificationException in SynchronizationRegistryImpl.notifySynchronizationsAfterTransactionCompletion due to SynchronizationRegistryImpl.clearSynchronizations clearing SynchronizationRegistryImpl.synchronizations

Gail Badner (JIRA) noreply at atlassian.com
Fri Apr 27 15:34:52 EDT 2012


    [ https://hibernate.onjira.com/browse/HHH-7265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46455#comment-46455 ] 

Gail Badner commented on HHH-7265:
----------------------------------

I was also thinking that there should be a way delegate to the session owner (EntityManager) to determine if the session can be auto-closed. IMO, this is a better alternative than adding a "system" synchronization along with more assumptions about when it gets executed wrt observers, actions, and "normal" synchronizations.

Steve, I'm not sure how properties can be used to determine if the session should be auto-closed when using PersistenceContextType.EXTENDED. Using PersistenceContextType.EXTENDED, IIUC, the session should only be auto-closed after a transaction if the EntityManager is closed, so it's not a simple property lookup. Am I missing something here (very possible)?

There is a test in the pull request that illustrates this case: TransactionJoiningTest.testCloseAfterCommit(). 


> ConcurrentModificationException in SynchronizationRegistryImpl.notifySynchronizationsAfterTransactionCompletion due to SynchronizationRegistryImpl.clearSynchronizations clearing SynchronizationRegistryImpl.synchronizations
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HHH-7265
>                 URL: https://hibernate.onjira.com/browse/HHH-7265
>             Project: Hibernate ORM
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 4.1.2
>         Environment: AS7 7.1.1 
>            Reporter: Scott Marlow
>            Assignee: Gail Badner
>             Fix For: 4.1.3
>
>         Attachments: hibernatesearchsync.jpg
>
>
> forum post link here includes the AS7 test case and description https://community.jboss.org/thread/197649?start=0&tstart=0
> http://pastie.org/3819424 is the call stack showing SynchronizationRegistryImpl.notifySynchronizationsAfterTransactionCompletion looping on synchronization which is cleared mid-loop by SynchronizationRegistryImpl.clearSynchronizations

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list