Common persistence code between JPA and CMP 8.0.0-M5 API