openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <>
Subject Re: Multiple concurrent threads attempted to access a single broker
Date Thu, 22 Sep 2011 16:36:59 GMT
Hi Chintan,
  The error message is rather obvious -- in not it? 
As a suggestion, consider 
private static Map&lt;String, EntityManagerFactory&gt; buEntityMap;
instead of 
private static Map&lt;String, List&lt;EntityManager&gt;> buEntityMap;

EntityManagers have shorter life cycle and not so effective as cached items.
On the other hand EntityManagerFactory are ideally created once in the
entire life time of an application and good candidate to be remembered. 

  See if that solves the problem of multiple threads entering a single


Pinaki Poddar
Chair, Apache OpenJPA Project
View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message