Correct use of JPA refresh