{
final Connection conn = handle.getConnection();
try {
final Savepoint savepoint = localStuff.get(handle).getCheckpoints().remove(name);
if (savepoint == null) {
throw new TransactionException(String.format("Attempt to rollback to non-existant savepoint, '%s'",
name));
}
conn.releaseSavepoint(savepoint);
}
catch (SQLException e) {
throw new TransactionException(String.format("Unable to create checkpoint %s", name), e);
}
}