Kieran Simpson [
http://community.jboss.org/people/kierans] created the discussion
"Re: Why do EJBs share EntityManager instances"
To view the discussion, visit:
http://community.jboss.org/message/575802#575802
--------------------------------------------------------------
Doing some further digging around, the object that is being injected into the DAOs is an
instance of
http://grepcode.com/file/repository.jboss.org/nexus/content/repositories/...
org.jboss.jpa.tx.TransactionScopedEntityManager which is located in the
jboss-as/common/lib/jboss-jpa-deployers.jar JAR. Looking inside the manifest, the JAR is
at version 1.0.0
Looking at the source, it would appear as if the TSEM class should be doing what I
thought it should do; that is provide EntityManagers which are only enrolled in the
transaction that is currently assigned to the thread.
Still I have no idea why when a transaction is rolled back in one thread all transactions
are rolled back. Perhaps this is a transaction management issue rather than an
EntityManager problem.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/575802#575802]
Start a new discussion in EJB3 at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]