Well, from what I'm experiencing, I can see the opposite action, that they're 
not closed, or at least not immediately because that error is triggered, which 
shouldn't happen if they were closed.
That's why I wrote this post.


________________________________
 From: Romain Manni-Bucau [via OpenEJB] 
<[email protected]>
To: zmirc <[email protected]> 
Sent: Monday, August 19, 2013 2:59 PM
Subject: Re: Entity belongs to another EntityManager - @Stateless bean error
 


Hi, we close the em with the transaction. That's normal you can't call it 
yourself. 

*Romain Manni-Bucau* 
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>* 
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/> 
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/8/19 zmirc <[hidden email]> 


> Hi! 
> 
> I'm using ObjectDB and Tomee 1.5.2 and I've faced the following problem, 
> which is described here: 
> http://www.objectdb.com/database/forum/660
> <http://www.objectdb.com/database/forum/660> 
> 
> Quick overview: @Stateless method execution might not close injected 
> EntityManager, therefore the database throws the following error (Entity 
> belongs to another EntityManager) when an entity obtained through a query 
> in 
> a @Stateless bean is used in another query in another of another 
> @Stateless, 
> in 2 different transactions. 
> 
> Is that the right behavior of @Stateless? Shouldn't the EM manager be 
> method 
> transactional by default, thus not triggering this error? 
> 
> Please check the error report from ObjectDB's forum (the link above) for 
> more details. 
> Thanks in advance. 
> 
> 
> 
> -- 
> View this message in context: 
> http://openejb.979440.n4.nabble.com/Entity-belongs-to-another-EntityManager-Stateless-bean-error-tp4664720.html
> Sent from the OpenEJB User mailing list archive at Nabble.com. 
> 


________________________________
 
If you reply to this email, your message will be added to the discussion 
below:http://openejb.979440.n4.nabble.com/Entity-belongs-to-another-EntityManager-Stateless-bean-error-tp4664720p4664722.html
 
To unsubscribe from Entity belongs to another EntityManager - @Stateless bean 
error, click here.
NAML 



--
View this message in context: 
http://openejb.979440.n4.nabble.com/Entity-belongs-to-another-EntityManager-Stateless-bean-error-tp4664720p4664723.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to