- I know that 
EntityManagerinstantiated by myself is not thread-safe. - I know that 
EntityManagerinjected via@PersistenceContextin EJB behaves like hread-safe, because EJB container serializes access to EJB beans. - I know that in EJB injected 
EntityManageris really a proxy. - I know that when I inject 
EntityManagervia@PersistenceContextto@DependentCDI bean and inject that bean to EJB, it behaves like thread-safe because of covering EJB (I believe that in this caseEntityManageris proxy too). 
But:
- What happens when I inject 
EntityManagervia@PersistenceContextto CDI bean and use this bean directly for example in Servlet? I believe that thisEntityManageris a proxy, so does this proxy guarantee thread safety? 
Edit: Similar question Java CDI @PersistenceContext and thread safety does't solve my problem, because accepted answer shows EJB examples, not CDI examples.
Edit: I checked source code of WildFly application server and it looks that WildFly uses thread-safe proxy in CDI. This proxy selects real EntityManager when needed. Real EntityManagers are kept in special structure - stack of maps of EntityManagers in ThreadLocal.