Common persistence code between JPA and CMP 7.0.5 API