if after
EnityManager#merge()
the EntityManager is closed with an active transaction, when the transaction is committed an
java.lang.IllegalStateException: Session/EntityManager is closed
is raised.