[FIX] Correctly close JPA EntityManager in a couple of places (#1574)

3 files changed