Improve JPA transaction