try {
session = PersistenceManagerUtils.getSession(this.getPersistenceManager(), true);
PrevaylerCallback callback = new UpdateCallback(entity);
Object saved = session.execute(callback);
if (entity != saved) {
session.execute(new MergeCallback(saved, entity));
}
return saved;
} catch(DataAccessException ex) {
throw ex;
} catch(Exception ex) {