[ https://issues.apache.org/jira/browse/DELTASPIKE-1378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16839831#comment-16839831 ]
ASF subversion and git services commented on DELTASPIKE-1378: ------------------------------------------------------------- Commit eb6ae03a3286232ad0606d2f2bf6f4eb82607ab6 in deltaspike's branch refs/heads/master from Gerhard Petracek [ https://gitbox.apache.org/repos/asf?p=deltaspike.git;h=eb6ae03 ] DELTASPIKE-1378 fixed initialization of EntityManagerRefLookup > EntityManagerRefLookup returns null globalEntityManager when > lazyInitGlobalEntityManager is called by multiple threads > ---------------------------------------------------------------------------------------------------------------------- > > Key: DELTASPIKE-1378 > URL: https://issues.apache.org/jira/browse/DELTASPIKE-1378 > Project: DeltaSpike > Issue Type: Bug > Components: JPA-Module > Affects Versions: 1.9.0 > Reporter: Raymond Domingo > Assignee: Thomas Andraschko > Priority: Major > Fix For: 1.9.1 > > > *Situation* > If multiple threads invoke lazyInitGlobalEntityManager at same time and > lazyInitGlobalEntityManager isn't invoked before. Some of these threads might > end up with a null entitymanager, because lazyInitGlobalEntityManager isn't > synchronized (or this.globalEntityManagerInitialized = true is at wrong > place). > Might be *important* to fix this, because In rare situations this might break > your application and even cause inconsistent data. > *Problem* > entityManager is null after initialization is concurrently called > *Expected* > entityManager won't be null when initialized concurrently > > *PR* > [https://github.com/apache/deltaspike/pull/89] -- This message was sent by Atlassian JIRA (v7.6.3#76005)