) {
PersistenceService persistenceSvc = PersistenceService.getInstance();
try {
persistenceSvc.beginTx();
String query = "SELECT e FROM Address e";
return new AddressesConverter(getEntities(start, max, query), uriInfo.getAbsolutePath(), Api.DEFAULT_EXPAND_LEVEL);
} finally {
persistenceSvc.commitTx();
persistenceSvc.close();
}
}