public Response post(RecordIdentifierConverter data) {
PersistenceService persistenceSvc = PersistenceService.getInstance();
try {
persistenceSvc.beginTx();
EntityManager em = persistenceSvc.getEntityManager();
RecordIdentifier entity = data.resolveEntity(em);
createEntity(data.resolveEntity(em));
persistenceSvc.commitTx();
return Response.created(uriInfo.getAbsolutePath().resolve(entity.getId() + "/")).build();
} finally {
persistenceSvc.close();
}
}