Tuning applications that use the Java Persistence API