[
https://issues.apache.org/jira/browse/OPENJPA-324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521216
]
Patrick Linskey commented on OPENJPA-324:
-----------------------------------------
Does this happen if you list all of your persistent types in your persistence
unit and obtain an EM before doing any "real" work in the system?
> The MetaDataRepository class is not thread safe. Initialization under heavy
> load on a multi CPU/Core systems throws exceptions.
> --------------------------------------------------------------------------------------------------------------------------------
>
> Key: OPENJPA-324
> URL: https://issues.apache.org/jira/browse/OPENJPA-324
> Project: OpenJPA
> Issue Type: Bug
> Components: kernel
> Affects Versions: 0.9.6, 0.9.7
> Environment: I have reproduced the problem in Windows and in Solaris.
> It only affects multi core/CPU systems. I haven't reproduced the problem on
> single core systems.
> I am using Spring 2.0.2 and OpenJPA 0.9.6 with an Oracle 10g database.
> Reporter: Chris Ward
> Attachments: MetaDataRepository.java
>
>
> OpenJPA's MetaDataRepository fails to load metadata for classess when
> multiple threads use the same EntityManagerFactory class to resolve the
> metadata. The MetaDataRepository implementation is not thread safe.The
> problem only occurrs on multi core or multi processor machines that can
> concurrently try to initialize meta data for classes.
> To reproduce the problem I have inserted a sleep statement within the code to
> help reproduce the problem consistently. I have commented out the sleep
> statement in my deployed version of the class.
> This bug is sort of related to issue 250. I have cleaned up all of the
> synchronization in the class. There should be less contention, however it
> could still be better if a ReentrantReadWriteLock was used. I noticed that
> someone had posted a new MetaDataRepository with a ReentrantReadWriteLock,
> but too seems to have the same issues.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.