Does calling EntityManager.remove(someEntity)
-for other than transaction scoped entity manager- cause the entity to be detached? As I was reading the JSR-317 :
A detached entity results from transaction commit if a transaction-scoped container-managed entity manager is used (see section 3.3); from transaction rollback (see section 3.3.2); from detaching the entity from the persistence context; from clearing the persistence context; from closing an entity manager; or from serializing an entity or otherwise passing an entity by value—e.g., to a separate application tier, through a remote interface, etc.
It didn't mention that remove()
causes the entity to be detached, though other web sites mentions it. please provide a reference to your answer.