xxxxxxxxxx
An EntityManager Context injected with @PersistenceContext is transactionally scoped.
In order to “live” beyond the commit or rollback of a transaction you have to create the EntityManager from the EntityManager yourself, and close it yourself.