Refactor AbstractDao to delay EntityManager creation until transaction is active.