remove(obj);
insert(obj);
connection.commit();
} catch (Exception e) {
connection.rollback();
throw new DBException(e);
} finally {
connection.finishTransaction();
}
} else {
DBSavePoint point = connection.savePoint();
try{
remove(obj);
insert(obj);
} catch (Exception e) {
connection.rollback(point);
throw new DBException(e);
} finally {
connection.releasePoint(point);
}
}
}