You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Patrick Linskey <pl...@bea.com> on 2007/03/29 10:39:03 UTC

RE: WARNING: Connection not closed by caller -messagesproducedbyOpenJPA?

> As I mentioned, there is a static EMF in a helper class used 
> to obtain the EM's called from different
> threads. does above property also resolve multithreaded 
> access to the EMF? 

No. The EMF is always thread-safe (or should be, at least).

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc. 

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it. 

> -----Original Message-----
> From: Hans J. Prueller [mailto:hans.prueller@gmx.net] 
> Sent: Wednesday, March 28, 2007 10:10 PM
> To: open-jpa-dev@incubator.apache.org
> Subject: RE: WARNING: Connection not closed by caller 
> -messagesproducedbyOpenJPA?
> 
> >> If you want to access a single EM from multiple
> >> threads, you should set the openjpa.Multithreaded property 
> accordingly
> 
> As I mentioned, there is a static EMF in a helper class used 
> to obtain the EM's called from different
> threads. does above property also resolve multithreaded 
> access to the EMF? 
> 
> Hans
> 
> Am Mittwoch, den 28.03.2007, 13:30 -0700 schrieb Patrick Linskey: 
> 
> 	
> 	> I will give it a try. Can you explicitly confirm that it 
> 	> shouldn't be a multithreading problem where there are 
> 	> serveral entitymanagers
> 	> created in different JTA transactions running in 
> parallel? e.g.
> 	
> 	Assuming that the different JTA transactions are on 
> different threads,
> 	and that you do not try to access one EM from multiple 
> threads, there
> 	should be no problem. (If you want to access a single 
> EM from multiple
> 	threads, you should set the openjpa.Multithreaded 
> property accordingly.)
> 	
> 	Also, it would be useful to see a JDBC trace-level log 
> of the system
> 	running through a couple of transactions. That might 
> give us an idea of
> 	how things are working.
> 	
> 	Are you ever sharing EMs across multiple sequential JTA 
> transactions?
> 	
> 	-Patrick
> 	
> 
> 

Notice:  This email message, together with any attachments, may contain information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.