Does jboss handle Entity Manager concurrency handling for me?

It seems that the jboss instance of the Entity Manager management object manages and exposes this to the proxy for the actual implementation, tied to the persistence context.

This actual implementation collects the isolation provided by JTA transactions (for each transaction context).

This makes me think that I don’t have to worry about concurrency issues when working with a proxy instance.

Maybe I can even cache this proxy instance if I decided to pull it out of the JNDI search instead of injecting the container?

It is reasonable?

+2
source share
1 answer

@PersistenceContext EntityManagers. EntityManager.

EJB, , , . .

, EntityManager @PersistenceContext Servlets ( concurrency), . @PersistenceUnit. JBoss 7 JPA Reference Guide:

, ( , ).

, Persistence Context JTA EntityManagers . , .

+3

All Articles