Skip to main content

Adam Bien: Is in an EJB injected EntityManager thread-safe?

Adam Bien answers Is in an EJB injected EntityManager thread-safe?:

You can inject EntityManager directly into EJBs. But: is it thread safe? It is, the EJB 3.1 specification, JSR-318, page 82 explains the reasons: "The container serializes calls to each stateful and stateless session bean instance. Most containers will support many instances of a session bean executing concurrently; however...

Community: Java Enterprise