Common persistence code between JPA and CMP 8.0.0-M3 API