The best way to prevent Java Persistence and Hibernate performance issues